recycle symbol woes with multiple html entity encode/decode cycles going on

This commit is contained in:
friendica 2012-07-04 23:24:59 -07:00
parent e29dd081ca
commit 360c35e438
1 changed files with 3 additions and 0 deletions

View File

@ -44,6 +44,9 @@ function diaspora2bb($s) {
$s = html2bbcode($s); $s = html2bbcode($s);
// $s = str_replace('*','*',$s); // $s = str_replace('*','*',$s);
// protect the recycle symbol from turning into a tag, but without unescaping angles and naked ampersands
$s = str_replace('♲',html_entities_decode('♲',ENT_QUOTES,'UTF-8'),$s);
// Convert everything that looks like a link to a link // Convert everything that looks like a link to a link
$s = preg_replace("/([^\]\=]|^)(https?\:\/\/)([a-zA-Z0-9\:\/\-\?\&\;\.\=\_\~\#\%\$\!\+\,]+)/ism", '$1[url=$2$3]$2$3[/url]',$s); $s = preg_replace("/([^\]\=]|^)(https?\:\/\/)([a-zA-Z0-9\:\/\-\?\&\;\.\=\_\~\#\%\$\!\+\,]+)/ism", '$1[url=$2$3]$2$3[/url]',$s);