mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[ticket/11768] Toggled Unicode modifier in relative URL filter
get_preg_expression('relative_url') returns an expression that requires it PHPBB3-11768
This commit is contained in:
parent
cf39b02891
commit
dc303cbc99
1 changed files with 2 additions and 4 deletions
|
@ -163,13 +163,11 @@ class factory implements \phpbb\textformatter\cache
|
||||||
|
|
||||||
// Create custom filters for BBCode tokens that are supported in phpBB but not in
|
// Create custom filters for BBCode tokens that are supported in phpBB but not in
|
||||||
// s9e\TextFormatter
|
// s9e\TextFormatter
|
||||||
$filter = new RegexpFilter('#^' . get_preg_expression('relative_url') . '$#D');
|
$filter = new RegexpFilter('#^' . get_preg_expression('relative_url') . '$#Du');
|
||||||
$configurator->attributeFilters->add('#local_url', $filter);
|
$configurator->attributeFilters->add('#local_url', $filter);
|
||||||
$configurator->attributeFilters->add('#relative_url', $filter);
|
$configurator->attributeFilters->add('#relative_url', $filter);
|
||||||
|
|
||||||
$regexp = (phpbb_pcre_utf8_support())
|
$regexp = '!^([\p{L}\p{N}\-+,_. ]+)$!Du';
|
||||||
? '!^([\p{L}\p{N}\-+,_. ]+)$!uD'
|
|
||||||
: '!^([a-zA-Z0-9\-+,_. ]+)$!uD';
|
|
||||||
$configurator->attributeFilters->add('#inttext', new RegexpFilter($regexp));
|
$configurator->attributeFilters->add('#inttext', new RegexpFilter($regexp));
|
||||||
|
|
||||||
// Create custom filters for Flash restrictions, which use the same values as the image
|
// Create custom filters for Flash restrictions, which use the same values as the image
|
||||||
|
|
Loading…
Add table
Reference in a new issue