From 821af482f070bfc671d2f5b6480a370dc86f212e Mon Sep 17 00:00:00 2001 From: Max Kostikov Date: Tue, 16 Jul 2019 18:11:47 +0200 Subject: Exclude trailing punctuations from URL --- include/text.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/text.php') diff --git a/include/text.php b/include/text.php index 8ce6b5d7c..17fd1bfe4 100644 --- a/include/text.php +++ b/include/text.php @@ -3403,10 +3403,10 @@ function cleanup_bbcode($body) { $body = preg_replace_callback('/\[zrl(.*?)\[\/(zrl)\]/ism','\red_escape_codeblock',$body); $body = preg_replace_callback("/([^\]\='".'"'."\/\{]|^|\#\^)(https?\:\/\/[a-zA-Z0-9\pL\:\/\-\?\&\;\.\=\@\_\~\#\%\$\!\\ -+\,\(\)]+)/ismu", '\nakedoembed', $body); ++\,\(\)]+)([\,\.\:\;]\s|$)/ismu", '\nakedoembed', $body); $body = preg_replace_callback("/([^\]\='".'"'."\/\{]|^|\#\^)(https?\:\/\/[a-zA-Z0-9\pL\:\/\-\?\&\;\.\=\@\_\~\#\%\$\!\\ -+\,\(\)]+)/ismu", '\red_zrl_callback', $body); ++\,\(\)]+)([\,\.\:\;]\s|$)/ismu", '\red_zrl_callback', $body); $body = preg_replace_callback('/\[\$b64zrl(.*?)\[\/(zrl)\]/ism','\red_unescape_codeblock',$body); -- cgit v1.2.3