aboutsummaryrefslogtreecommitdiffstats
path: root/include/text.php
diff options
context:
space:
mode:
authorMax Kostikov <max@kostikov.co>2021-04-08 14:19:29 +0000
committerMax Kostikov <max@kostikov.co>2021-04-08 14:19:29 +0000
commitb5620cb79443fcbf1820341bce05fadbb0b124be (patch)
treef9842fdf61038c023bd6088576f40f893850256c /include/text.php
parent0d10f5ba65d209c76f811424eb255d9e4228c6b8 (diff)
parentcf62e07bec8ffe6b9e5c92d56c13ee3cbe06b5bf (diff)
downloadvolse-hubzilla-b5620cb79443fcbf1820341bce05fadbb0b124be.tar.gz
volse-hubzilla-b5620cb79443fcbf1820341bce05fadbb0b124be.tar.bz2
volse-hubzilla-b5620cb79443fcbf1820341bce05fadbb0b124be.zip
Merge branch 'dev' into 'dev'
Dev sync See merge request kostikov/core!1
Diffstat (limited to 'include/text.php')
-rw-r--r--include/text.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/text.php b/include/text.php
index c6980c5f8..1eaa890e0 100644
--- a/include/text.php
+++ b/include/text.php
@@ -3586,6 +3586,8 @@ function cleanup_bbcode($body) {
$body = preg_replace_callback('/\[url(.*?)\[\/(url)\]/ism','\red_escape_codeblock',$body);
$body = preg_replace_callback('/\[zrl(.*?)\[\/(zrl)\]/ism','\red_escape_codeblock',$body);
$body = preg_replace_callback('/\[svg(.*?)\[\/(svg)\]/ism','\red_escape_codeblock',$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);
@@ -3598,6 +3600,8 @@ function cleanup_bbcode($body) {
$body = preg_replace_callback('/\[\$b64url(.*?)\[\/(url)\]/ism','\red_unescape_codeblock',$body);
$body = preg_replace_callback('/\[\$b64code(.*?)\[\/(code)\]/ism','\red_unescape_codeblock',$body);
$body = preg_replace_callback('/\[\$b64svg(.*?)\[\/(svg)\]/ism','\red_unescape_codeblock',$body);
+ $body = preg_replace_callback('/\[\$b64img(.*?)\[\/(img)\]/ism','\red_unescape_codeblock',$body);
+ $body = preg_replace_callback('/\[\$b64zmg(.*?)\[\/(zmg)\]/ism','\red_unescape_codeblock',$body);
// fix any img tags that should be zmg