0
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-01-03 13:21:51 +00:00

Add %URI.UnescapeCharacters directive

Allow to add char that won't be escape by the uri filter
This commit is contained in:
Sacha Froment 2015-03-23 12:17:07 +01:00
parent c67e4c2f7e
commit bf7481d8f2
3 changed files with 10 additions and 1 deletions

View File

@ -0,0 +1,9 @@
URI.UnescapeCharacters
TYPE: string/null
DEFAULT: NULL
--DESCRIPTION--
<p>
Defines characters that won't be escape by HTMLPurifier_URI.
</p>
--# vim: et sw=4 sts=4

View File

@ -106,7 +106,7 @@ class HTMLPurifier_URI
public function validate($config, $context)
{
// ABNF definitions from RFC 3986
$chars_sub_delims = '!$&\'()*+,;=';
$chars_sub_delims = '!$&\'()*+,;='.$config->get('URI.UnescapeCharacters');;
$chars_gen_delims = ':/?#[]@';
$chars_pchar = $chars_sub_delims . ':@';