aboutsummaryrefslogtreecommitdiffstats
path: root/include/text.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2024-10-12 17:05:19 +0000
committerMario <mario@mariovavti.com>2024-10-12 17:05:19 +0000
commit40a9989be2366f30a37c8d451bae74a1d304319b (patch)
tree246ebe0acd3cc6a2f237add5d2d7e7ade8c6f9e2 /include/text.php
parent05a5b644bf043aee941d17ac3fb254c99b1c64d1 (diff)
parentd1648927b52b537314b470fdb9b5001ed6809c4f (diff)
downloadvolse-hubzilla-40a9989be2366f30a37c8d451bae74a1d304319b.tar.gz
volse-hubzilla-40a9989be2366f30a37c8d451bae74a1d304319b.tar.bz2
volse-hubzilla-40a9989be2366f30a37c8d451bae74a1d304319b.zip
Merge branch 'fix-cleanup-bbcode-url-regex' into 'dev'
Fix naked URLs immediately followed by a newline See merge request hubzilla/core!2150
Diffstat (limited to 'include/text.php')
-rw-r--r--include/text.php7
1 files changed, 2 insertions, 5 deletions
diff --git a/include/text.php b/include/text.php
index 137622b7d..e69ce7d10 100644
--- a/include/text.php
+++ b/include/text.php
@@ -3755,12 +3755,9 @@ function cleanup_bbcode($body) {
$body = preg_replace_callback('/\[img(.*?)\[\/(img)\]/ism','\red_escape_codeblock',$body);
$body = preg_replace_callback('/\[zmg(.*?)\[\/(zmg)\]/ism','\red_escape_codeblock',$body);
- $body = preg_replace_callback("/([^\]\='".'"'."\;\/\{]|^|\#\^)(https?\:\/\/[a-zA-Z0-9\pL\:\/\-\?\&\;\.\=\@\_\~\#\%\$\!\\
-+\,\(\)]+)/ismu", '\nakedoembed', $body);
-
- $body = preg_replace_callback("/([^\]\='".'"'."\;\/\{]|^|\#\^)(https?\:\/\/[a-zA-Z0-9\pL\:\/\-\?\&\;\.\=\@\_\~\#\%\$\!\\
-+\,\(\)]+)/ismu", '\red_zrl_callback', $body);
+ $body = preg_replace_callback("/([^\]\='".'"'."\;\/\{]|^|\#\^)(https?\:\/\/[a-zA-Z0-9\pL\:\/\-\?\&\;\.\=\@\_\~\#\%\$\!\\+\,\(\)]+)/ismu", '\nakedoembed', $body);
+ $body = preg_replace_callback("/([^\]\='".'"'."\;\/\{]|^|\#\^)(https?\:\/\/[a-zA-Z0-9\pL\:\/\-\?\&\;\.\=\@\_\~\#\%\$\!\\+\,\(\)]+)/ismu", '\red_zrl_callback', $body);
$body = preg_replace_callback('/\[\$b64code(.*?)\[\/(code)\]/ism','\red_unescape_codeblock',$body);
$body = preg_replace_callback('/\[\$b64summary(.*?)\[\/(summary)\]/ism','\red_unescape_codeblock',$body);