html_entity_decode D* incoming text
This commit is contained in:
parent
73564df4d8
commit
8f381e01ae
2 changed files with 4 additions and 2 deletions
|
@ -13,10 +13,12 @@ require_once('include/html2bbcode.php');
|
||||||
|
|
||||||
function diaspora2bb($s) {
|
function diaspora2bb($s) {
|
||||||
|
|
||||||
|
$s = html_entity_decode($s,ENT_COMPAT,'UTF-8');
|
||||||
|
|
||||||
$s = preg_replace('/\@\{(.+?)\; (.+?)\@(.+?)\}/','@[url=https://$3/u/$2]$1[/url]',$s);
|
$s = preg_replace('/\@\{(.+?)\; (.+?)\@(.+?)\}/','@[url=https://$3/u/$2]$1[/url]',$s);
|
||||||
$s = Markdown($s);
|
$s = Markdown($s);
|
||||||
$s = html2bbcode($s);
|
$s = html2bbcode($s);
|
||||||
$s = str_replace('*','*',$s);
|
// $s = str_replace('*','*',$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]$2[/youtube]',$s);
|
||||||
$s = preg_replace("/\[url\=https?:\/\/www.youtube.com\/watch\?v\=(.*?)\].*?\[\/url\]/ism",'[youtube]$1[/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);
|
$s = preg_replace("/\[url\=?(.*?)\]https?:\/\/vimeo.com\/([0-9]+)(.*?)\[\/url\]/ism",'[vimeo]$2[/vimeo]',$s);
|
||||||
|
|
|
@ -187,7 +187,7 @@ function message_content(&$a) {
|
||||||
$o .= replace_macros($tpl, array(
|
$o .= replace_macros($tpl, array(
|
||||||
'$id' => $rr['id'],
|
'$id' => $rr['id'],
|
||||||
'$from_name' =>$rr['from-name'],
|
'$from_name' =>$rr['from-name'],
|
||||||
'$from_url' => $a->get_baseurl() . '/redir/' . $rr['contact-id'],
|
'$from_url' => (($rr['network'] === NETWORK_DFRN) ? $a->get_baseurl() . '/redir/' . $rr['contact-id'] : $rr['url'],
|
||||||
'$sparkle' => ' sparkle',
|
'$sparkle' => ' sparkle',
|
||||||
'$from_photo' => $rr['thumb'],
|
'$from_photo' => $rr['thumb'],
|
||||||
'$subject' => template_escape((($rr['mailseen']) ? $rr['title'] : '<strong>' . $rr['title'] . '</strong>')),
|
'$subject' => template_escape((($rr['mailseen']) ? $rr['title'] : '<strong>' . $rr['title'] . '</strong>')),
|
||||||
|
|
Loading…
Reference in a new issue