mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-22 22:33:55 -07:00
URL RegExp Fix
Фикс распознавания ссылок содержащих одинарную ковычку
This commit is contained in:
parent
9fd886f8fb
commit
8a708b1c0b
1 changed files with 2 additions and 2 deletions
|
@ -573,7 +573,7 @@ class bbcode
|
|||
$text = preg_replace_callback('#(\[(quote|spoiler)=")(.+?)("\])#', array(&$this, 'escape_tiltes_callback'), $text);
|
||||
|
||||
// [url]
|
||||
$url_exp = '[\w\#!$%&~/.\-;:=,?@а-яА-Я()\[\]+]+?';
|
||||
$url_exp = "[\w\#!$%&~/.\-;':=,?@а-яА-Я()\[\]+]+?";
|
||||
$text = preg_replace_callback("#\[url\]((?:https?://)?$url_exp)\[/url\]#isu", array(&$this, 'url_callback'), $text);
|
||||
$text = preg_replace_callback("#\[url\](www\.$url_exp)\[/url\]#isu", array(&$this, 'url_callback'), $text);
|
||||
$text = preg_replace_callback("#\[url=((?:https?://)?$url_exp)\]([^?\n\t].*?)\[/url\]#isu", array(&$this, 'url_callback'), $text);
|
||||
|
@ -737,7 +737,7 @@ class bbcode
|
|||
(?<![\"'=])
|
||||
\b
|
||||
(
|
||||
https?://[\w\#!$%&~/.\-;:=?@а-яА-Я()\[\]+]+
|
||||
https?://[\w\#!$%&~/.\-;':=?@а-яА-Я()\[\]+]+
|
||||
)
|
||||
(?![\"']|\[/url|\[/img|</a)
|
||||
(?=[,!]?\s|[\)<!])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue