mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 03:32:00 +09:00
Improve url regular expression
- Improve regex to process non-whitespace characters only - Remove /s flag
This commit is contained in:
parent
96bbbcf4bc
commit
adcbe248c5
1 changed files with 1 additions and 1 deletions
|
|
@ -449,7 +449,7 @@ class TemplateHandler
|
||||||
foreach ($url_list as &$url) {
|
foreach ($url_list as &$url) {
|
||||||
// replace if url is not starting with the pattern
|
// replace if url is not starting with the pattern
|
||||||
$url = preg_replace_callback(
|
$url = preg_replace_callback(
|
||||||
'/^(?!(?:https?|file):\/\/|[\/\{])([^"]+)/is',
|
'/^(?!(?:https?|file):\/\/|[\/\{])(\S+)/i',
|
||||||
array($this, '_replaceRelativePath'),
|
array($this, '_replaceRelativePath'),
|
||||||
trim($url)
|
trim($url)
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue