diff options
author | Thomas Willingham <founder@kakste.com> | 2012-04-24 02:18:51 +0100 |
---|---|---|
committer | Thomas Willingham <founder@kakste.com> | 2012-04-24 02:18:51 +0100 |
commit | 8a80ea24d1d8039be6dc532c9db23c60e71eb467 (patch) | |
tree | 7f94f8d1e2336bbb7e69a327a003b6880f0610c0 /include/bbcode.php | |
parent | c4f4715a541ad89dfd348f14c4e25a83006e74e7 (diff) | |
parent | af7abcea2715824cbd6460a7323c8bb64bd5b829 (diff) | |
download | volse-hubzilla-8a80ea24d1d8039be6dc532c9db23c60e71eb467.tar.gz volse-hubzilla-8a80ea24d1d8039be6dc532c9db23c60e71eb467.tar.bz2 volse-hubzilla-8a80ea24d1d8039be6dc532c9db23c60e71eb467.zip |
Merge remote-tracking branch 'upstream/master'
Merge upstream
Diffstat (limited to 'include/bbcode.php')
-rw-r--r-- | include/bbcode.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/bbcode.php b/include/bbcode.php index 9befbd0f7..85d310b75 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -230,7 +230,8 @@ function bbcode($Text,$preserve_nl = false) { $Text); // [img=widthxheight]image source[/img] - $Text = preg_replace("/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/ism", '<img src="$3" style="height: $2px; width: $1px;" >', $Text); + //$Text = preg_replace("/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/ism", '<img src="$3" style="height: $2px; width: $1px;" >', $Text); + $Text = preg_replace("/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/ism", '<img src="$3" style="width: $1px;" >', $Text); // Images // [img]pathtoimage[/img] @@ -297,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)) |