From 8a708b1c0b6ac27aa9b668f01ddc240e0e5acb38 Mon Sep 17 00:00:00 2001 From: Dark Nightmare Date: Mon, 4 May 2015 09:06:29 +0600 Subject: [PATCH] URL RegExp Fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Фикс распознавания ссылок содержащих одинарную ковычку --- library/includes/bbcode.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/includes/bbcode.php b/library/includes/bbcode.php index 6eccb1955..6e5cfe97e 100644 --- a/library/includes/bbcode.php +++ b/library/includes/bbcode.php @@ -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 (?