line 2913 added urlencode

There was a cross site scripting vulnerability due to insufficient input sanitation on the $pg parameter.  This patch fixes that issue.
Merge pull request #523 from SkillfulHacking/patch-1

line 2913 added urlencode