diff options
author | Friendika <info@friendika.com> | 2011-09-14 20:47:49 -0700 |
---|---|---|
committer | Friendika <info@friendika.com> | 2011-09-14 20:47:49 -0700 |
commit | 1778e4a315dd386911d12513d6aa7dc569782f13 (patch) | |
tree | 48724c299e8ad4d6b7ad021c5599cdc50270f60d /include/bbcode.php | |
parent | 58b2bb58486a79e6725db8ed6153d8f4ab08cf21 (diff) | |
download | volse-hubzilla-1778e4a315dd386911d12513d6aa7dc569782f13.tar.gz volse-hubzilla-1778e4a315dd386911d12513d6aa7dc569782f13.tar.bz2 volse-hubzilla-1778e4a315dd386911d12513d6aa7dc569782f13.zip |
bloody ampersands
Diffstat (limited to 'include/bbcode.php')
-rw-r--r-- | include/bbcode.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/bbcode.php b/include/bbcode.php index af6c10c44..3886af37d 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -43,7 +43,7 @@ function bbcode($Text,$preserve_nl = false) { // Perform URL Search - $Text = preg_replace("/([^\]\=]|^)(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\.\=\_\~\#\%\$\!\+\,]+)/", '$1<a href="$2" target="external-link">$2</a>', $Text); + $Text = preg_replace("/([^\]\=]|^)(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\;\.\=\_\~\#\%\$\!\+\,]+)/", '$1<a href="$2" target="external-link">$2</a>', $Text); $Text = preg_replace("/\[url\]([$URLSearchString]*)\[\/url\]/m", '<a href="$1" target="external-link">$1</a>', $Text); $Text = preg_replace("/\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/m", '<a href="$1" target="external-link">$2</a>', $Text); @@ -159,7 +159,8 @@ function bbcode($Text,$preserve_nl = false) { $Text = preg_replace("/\[event\-adjust\](.*?)\[\/event\-adjust\]/ism",'',$Text); } - + // fix any escaped ampersands that may have been converted into links + $Text = preg_replace("/\<(.*?)(src|href)=(.*?)\&\;(.*?)\>/ism",'<$1$2=$3&$4>',$Text); call_hooks('bbcode',$Text); |