From 0fba5efd0932e830dcdbc3f7a1dc950b4230c163 Mon Sep 17 00:00:00 2001 From: Dark Nightmare Date: Thu, 18 Sep 2014 07:00:04 +0600 Subject: [PATCH] Fix url bbcode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit фикс ссылок типа https://site.com/public/4f7b69175cbf%2F%D0%A1%D0%BD%D0%BE%D0%B2%D0%B0%20%D0%BE%D0%B4%D0%B8%D0%BD%20%D0%BD%D0%B0%20%D0%B2%D1%81%D0%B5%D1%85%2001_%D1%81%D0%B5%D1%80%D0%B8%D1%8F_WEBRip_1080p%20(1)-009.mkv содержащих скобки --- upload/includes/bbcode.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upload/includes/bbcode.php b/upload/includes/bbcode.php index 53ec6e420..eafbe7733 100644 --- a/upload/includes/bbcode.php +++ b/upload/includes/bbcode.php @@ -575,7 +575,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);