aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
Diffstat (limited to 'mod')
-rw-r--r--mod/item.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/mod/item.php b/mod/item.php
index 69cc624ea..784ee31b4 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -429,10 +429,15 @@ function item_post(&$a) {
* otherwise http://elsewhere.com becomes #^[url=http://elsewhere.com]http://elsewhere.com[/url]
*/
+ $body = preg_replace_callback('/\[code\](.*?)\[\/code\]/ism','red_escape_codeblock',$body);
+
$body = preg_replace_callback('/\[([uz])rl(.*?)\](.*?)(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\;\.\=\@\_\~\#\%\$\!\+\,]+)(.*?)\[\/([uz])rl\]/ism','red_escape_zrl_callback',$body);
$body = preg_replace_callback("/([^\]\='".'"'."]|^|\#\^)(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\;\.\=\@\_\~\#\%\$\!\+\,]+)/ism", 'red_zrl_callback', $body);
+ $body = preg_replace_callback('/\[code\](.*?)\[\/code\]/ism','red_unescape_codeblock',$body);
+
+
/**
*
* When a photo was uploaded into the message using the (profile wall) ajax