mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-07-10 01:06:20 +02:00
feat: Define option URI.AllowedSymbols (#447)
This commit is contained in:
File diff suppressed because one or more lines are too long
@ -0,0 +1,7 @@
|
|||||||
|
URI.AllowedSymbols
|
||||||
|
TYPE: string/null
|
||||||
|
DEFAULT: '!$&\'()*+,;='
|
||||||
|
--DESCRIPTION--
|
||||||
|
If a system permits templated URLs, then the URI encoder may need extra
|
||||||
|
hints about which symbols to preserve.
|
||||||
|
--# vim: et sw=4 sts=4
|
@ -108,7 +108,7 @@ class HTMLPurifier_URI
|
|||||||
public function validate($config, $context)
|
public function validate($config, $context)
|
||||||
{
|
{
|
||||||
// ABNF definitions from RFC 3986
|
// ABNF definitions from RFC 3986
|
||||||
$chars_sub_delims = '!$&\'()*+,;=';
|
$chars_sub_delims = $config->get('URI.AllowedSymbols');
|
||||||
$chars_gen_delims = ':/?#[]@';
|
$chars_gen_delims = ':/?#[]@';
|
||||||
$chars_pchar = $chars_sub_delims . ':@';
|
$chars_pchar = $chars_sub_delims . ':@';
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user