]> git.mxchange.org Git - friendica.git/commitdiff
recycle symbol woes with multiple html entity encode/decode cycles going on
authorfriendica <info@friendica.com>
Thu, 5 Jul 2012 06:24:59 +0000 (23:24 -0700)
committerfriendica <info@friendica.com>
Thu, 5 Jul 2012 06:24:59 +0000 (23:24 -0700)
include/bb2diaspora.php

index d756b922d633860e4eb36189622baf4545da2fa9..c93b60d0d172aeb00c74bf39ef2ee15b57175c1b 100644 (file)
@@ -44,6 +44,9 @@ function diaspora2bb($s) {
        $s = html2bbcode($s);
 //     $s = str_replace('&#42;','*',$s);
 
+       // protect the recycle symbol from turning into a tag, but without unescaping angles and naked ampersands
+       $s = str_replace('&#x2672;',html_entities_decode('&#x2672;',ENT_QUOTES,'UTF-8'),$s);
+
        // 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);