From e6f46e65a7a8d55e771fcfe0f3ab853ed3411214 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Fri, 25 May 2007 18:00:22 +0000 Subject: fix an improper fix. - generally, sorry, but direct url parsing after ] will no longer work... - try to eliminate the most common "bug" for placing urls within the [url=][/url] part (the text). This will trigger make_clickable and render the url invalid (doubled url), moreso if other text is involved too. This is still te case if the url is not written directly after the [url=] part. This is nearly the best we can get within 3.0.x - and every report about [url=], [url] and make_clickable and it's non-parsing or parsing will be closed with "will not fix", except it is a critical bug resulting in the non-functioning of the board. We may adjust this later to our own liking while we try to find different ways to face these problems. git-svn-id: file:///svn/phpbb/trunk@7681 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/message_parser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/includes/message_parser.php') diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php index a593dffec6..b8f00d71ee 100644 --- a/phpBB/includes/message_parser.php +++ b/phpBB/includes/message_parser.php @@ -905,7 +905,7 @@ class bbcode_firstpass extends bbcode $url = append_sid($url); } - return ($var1) ? '[url=' . $this->bbcode_specialchars($url) . ':' . $this->bbcode_uid . ']' . $this->bbcode_specialchars($var2) . '[/url:' . $this->bbcode_uid . ']' : '[url:' . $this->bbcode_uid . ']' . $this->bbcode_specialchars($url) . '[/url:' . $this->bbcode_uid . ']'; + return ($var1) ? '[url=' . $this->bbcode_specialchars($url) . ':' . $this->bbcode_uid . ']' . $var2 . '[/url:' . $this->bbcode_uid . ']' : '[url:' . $this->bbcode_uid . ']' . $this->bbcode_specialchars($url) . '[/url:' . $this->bbcode_uid . ']'; } return '[url' . (($var1) ? '=' . $var1 : '') . ']' . $var2 . '[/url]'; -- cgit v1.2.1