mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-02 23:07:39 +02: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:
@@ -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
|
||||||
|
Reference in New Issue
Block a user