diff options
author | friendica <info@friendica.com> | 2014-02-10 01:11:59 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2014-02-10 01:11:59 -0800 |
commit | a76c53657bca9ea6aa2246535f117f7043bb5205 (patch) | |
tree | a7acd8cf0a535fc9ec52458e105263d4a20dba90 /mod | |
parent | eb96a04d345fcb9abc489578573cb54a11f5a41c (diff) | |
download | volse-hubzilla-a76c53657bca9ea6aa2246535f117f7043bb5205.tar.gz volse-hubzilla-a76c53657bca9ea6aa2246535f117f7043bb5205.tar.bz2 volse-hubzilla-a76c53657bca9ea6aa2246535f117f7043bb5205.zip |
don't add bookmark tags to naked links inside code blocks
Diffstat (limited to 'mod')
-rw-r--r-- | mod/item.php | 5 |
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 |