mirror of
https://github.com/friendica/friendica
synced 2024-12-23 04:00:15 +00:00
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) {
|
||||
|
||||
$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('*','*',$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]$1[/youtube]',$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(
|
||||
'$id' => $rr['id'],
|
||||
'$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',
|
||||
'$from_photo' => $rr['thumb'],
|
||||
'$subject' => template_escape((($rr['mailseen']) ? $rr['title'] : '<strong>' . $rr['title'] . '</strong>')),
|
||||
|
|
Loading…
Reference in a new issue