aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2011-11-30 03:22:01 -0800
committerfriendica <info@friendica.com>2011-11-30 03:22:01 -0800
commit8f381e01aebbddfed9f56ba21e18837e570dee19 (patch)
treec53042e80dde76ee90f14d30d9e13fa3ef02f344 /include
parent73564df4d8e3dc42b9a1b179fb7c2ac8bc4b98b1 (diff)
downloadvolse-hubzilla-8f381e01aebbddfed9f56ba21e18837e570dee19.tar.gz
volse-hubzilla-8f381e01aebbddfed9f56ba21e18837e570dee19.tar.bz2
volse-hubzilla-8f381e01aebbddfed9f56ba21e18837e570dee19.zip
html_entity_decode D* incoming text
Diffstat (limited to 'include')
-rw-r--r--include/bb2diaspora.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/bb2diaspora.php b/include/bb2diaspora.php
index 036e6cdb8..eb709e01d 100644
--- a/include/bb2diaspora.php
+++ b/include/bb2diaspora.php
@@ -13,10 +13,12 @@ require_once('include/html2bbcode.php');
function diaspora2bb($s) {
+ $s = html_entity_decode($s,ENT_COMPAT,'UTF-8');
+
$s = preg_replace('/\@\{(.+?)\; (.+?)\@(.+?)\}/','@[url=https://$3/u/$2]$1[/url]',$s);
$s = Markdown($s);
$s = html2bbcode($s);
- $s = str_replace('&#42;','*',$s);
+// $s = str_replace('&#42;','*',$s);
$s = preg_replace("/\[url\=?(.*?)\]https?:\/\/www.youtube.com\/watch\?v\=(.*?)\[\/url\]/ism",'[youtube]$2[/youtube]',$s);
$s = preg_replace("/\[url\=https?:\/\/www.youtube.com\/watch\?v\=(.*?)\].*?\[\/url\]/ism",'[youtube]$1[/youtube]',$s);
$s = preg_replace("/\[url\=?(.*?)\]https?:\/\/vimeo.com\/([0-9]+)(.*?)\[\/url\]/ism",'[vimeo]$2[/vimeo]',$s);