mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +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) {
|
||||
// replace if url is not starting with the pattern
|
||||
$url = preg_replace_callback(
|
||||
'/^(?!(?:https?|file):\/\/|[\/\{])([^"]+)/is',
|
||||
'/^(?!(?:https?|file):\/\/|[\/\{])(\S+)/i',
|
||||
array($this, '_replaceRelativePath'),
|
||||
trim($url)
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue