kopia lustrzana https://github.com/friendica/friendica
commit
50af1fc2c3
|
@ -95,6 +95,9 @@ function bb2diaspora($Text,$preserve_nl = false, $fordiaspora = true) {
|
||||||
} else
|
} else
|
||||||
$Text = bbcode($Text, $preserve_nl, false, 4);
|
$Text = bbcode($Text, $preserve_nl, false, 4);
|
||||||
|
|
||||||
|
// mask some special HTML chars from conversation to markdown
|
||||||
|
$Text = str_replace(array('<','>','&'),array('&_lt_;','&_gt_;','&_amp_;'),$Text);
|
||||||
|
|
||||||
// If a link is followed by a quote then there should be a newline before it
|
// If a link is followed by a quote then there should be a newline before it
|
||||||
// Maybe we should make this newline at every time before a quote.
|
// Maybe we should make this newline at every time before a quote.
|
||||||
$Text = str_replace(array("</a><blockquote>"), array("</a><br><blockquote>"), $Text);
|
$Text = str_replace(array("</a><blockquote>"), array("</a><br><blockquote>"), $Text);
|
||||||
|
@ -104,6 +107,9 @@ function bb2diaspora($Text,$preserve_nl = false, $fordiaspora = true) {
|
||||||
// Now convert HTML to Markdown
|
// Now convert HTML to Markdown
|
||||||
$Text = new HTML_To_Markdown($Text);
|
$Text = new HTML_To_Markdown($Text);
|
||||||
|
|
||||||
|
// unmask the special chars back to HTML
|
||||||
|
$Text = str_replace(array('&_lt_;','&_gt_;','&_amp_;'),array('<','>','&'),$Text);
|
||||||
|
|
||||||
$a->save_timestamp($stamp1, "parser");
|
$a->save_timestamp($stamp1, "parser");
|
||||||
|
|
||||||
// Libertree has a problem with escaped hashtags.
|
// Libertree has a problem with escaped hashtags.
|
||||||
|
|
|
@ -1138,9 +1138,9 @@ function smilies($s, $sample = false) {
|
||||||
);
|
);
|
||||||
|
|
||||||
$icons = array(
|
$icons = array(
|
||||||
'<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-heart.gif" alt="<3" />',
|
'<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-heart.gif" alt="<3" />',
|
||||||
'<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-brokenheart.gif" alt="</3" />',
|
'<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-brokenheart.gif" alt="</3" />',
|
||||||
'<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-brokenheart.gif" alt="<\\3" />',
|
'<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-brokenheart.gif" alt="<\\3" />',
|
||||||
'<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-smile.gif" alt=":-)" />',
|
'<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-smile.gif" alt=":-)" />',
|
||||||
'<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-wink.gif" alt=";-)" />',
|
'<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-wink.gif" alt=";-)" />',
|
||||||
'<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-frown.gif" alt=":-(" />',
|
'<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-frown.gif" alt=":-(" />',
|
||||||
|
@ -1217,7 +1217,7 @@ function preg_heart($x) {
|
||||||
return $x[0];
|
return $x[0];
|
||||||
$t = '';
|
$t = '';
|
||||||
for($cnt = 0; $cnt < strlen($x[1]); $cnt ++)
|
for($cnt = 0; $cnt < strlen($x[1]); $cnt ++)
|
||||||
$t .= '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-heart.gif" alt="<3" />';
|
$t .= '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-heart.gif" alt="<3" />';
|
||||||
$r = str_replace($x[0],$t,$x[0]);
|
$r = str_replace($x[0],$t,$x[0]);
|
||||||
return $r;
|
return $r;
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue