1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-10-22 09:06:23 +02:00

[2.1.5] [MFH] Percent encode query and hash, and lazy update with attr validator

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/branches/php4@1787 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang
2008-06-11 04:00:06 +00:00
parent 0d262b3a1d
commit c03953f85e
4 changed files with 28 additions and 3 deletions

View File

@@ -131,6 +131,17 @@ class HTMLPurifier_URI
$this->path = ''; // just to be safe
}
// qf = query and fragment
$qf_encoder = new HTMLPurifier_PercentEncoder($chars_pchar . '/?');
if (!is_null($this->query)) {
$this->query = $qf_encoder->encode($this->query);
}
if (!is_null($this->fragment)) {
$this->fragment = $qf_encoder->encode($this->fragment);
}
return true;
}