diff options
author | friendica <info@friendica.com> | 2012-04-23 05:42:46 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2012-04-23 05:42:46 -0700 |
commit | e9e4fb664aab0f6cc4e8696eafc9ddba0797c11d (patch) | |
tree | 1d748a671ef2afc0711dc24117808676bd74a29c /include | |
parent | 8f0f644295ba292ebcc44edb1d8679bfb6a1d3a6 (diff) | |
download | volse-hubzilla-e9e4fb664aab0f6cc4e8696eafc9ddba0797c11d.tar.gz volse-hubzilla-e9e4fb664aab0f6cc4e8696eafc9ddba0797c11d.tar.bz2 volse-hubzilla-e9e4fb664aab0f6cc4e8696eafc9ddba0797c11d.zip |
allow bbcode representation of html symbols such as © by wrapping in bb brackets
Diffstat (limited to 'include')
-rw-r--r-- | include/bbcode.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/bbcode.php b/include/bbcode.php index 3697f1fc5..85d310b75 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -298,6 +298,9 @@ function bbcode($Text,$preserve_nl = false) { $Text = preg_replace_callback("/\[nobb\](.*?)\[\/nobb\]/ism", 'bb_unspacefy_and_trim',$Text); $Text = preg_replace_callback("/\[pre\](.*?)\[\/pre\]/ism", 'bb_unspacefy_and_trim',$Text); + + $Text = preg_replace('/\[\&\;([#a-z0-9]+)\;\]/','&$1;',$Text); + // fix any escaped ampersands that may have been converted into links $Text = preg_replace("/\<(.*?)(src|href)=(.*?)\&\;(.*?)\>/ism",'<$1$2=$3&$4>',$Text); if(strlen($saved_image)) |