aboutsummaryrefslogtreecommitdiffstats
path: root/include/text.php
diff options
context:
space:
mode:
authorMax Kostikov <max@kostikov.co>2019-07-16 18:11:47 +0200
committerMario <mario@mariovavti.com>2019-07-16 18:11:47 +0200
commit821af482f070bfc671d2f5b6480a370dc86f212e (patch)
treef5016ee72c8a21e773346aafb6ffce9d1da8cffd /include/text.php
parentb2d1fadf66fd5fc0d4f5774e8549fd81fbcf5241 (diff)
downloadvolse-hubzilla-821af482f070bfc671d2f5b6480a370dc86f212e.tar.gz
volse-hubzilla-821af482f070bfc671d2f5b6480a370dc86f212e.tar.bz2
volse-hubzilla-821af482f070bfc671d2f5b6480a370dc86f212e.zip
Exclude trailing punctuations from URL
Diffstat (limited to 'include/text.php')
-rw-r--r--include/text.php4
1 files changed, 2 insertions, 2 deletions
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);