parse url: Characters like < and > has to be escaped when showing the parsed output.

This commit is contained in:
Michael Vogel 2014-02-16 17:35:01 +01:00
parent 046096e705
commit 7cba752f8a

View file

@ -327,12 +327,14 @@ function parse_url_content(&$a) {
if($url && $title && $text) {
$title = str_replace(array("\r","\n"),array('',''),$title);
if($textmode)
$text = '[quote]' . trim($text) . '[/quote]' . $br;
else
$text = '<blockquote>' . trim($text) . '</blockquote><br />';
$title = str_replace(array("\r","\n"),array('',''),$title);
else {
$text = '<blockquote>' . htmlspecialchars(trim($text)) . '</blockquote><br />';
$title = htmlspecialchars($title);
}
$result = sprintf($template,$url,($title) ? $title : $url,$text) . $str_tags;
@ -381,7 +383,7 @@ function parse_url_content(&$a) {
if($textmode)
$text = '[quote]'.trim($text).'[/quote]';
else
$text = '<blockquote>'.trim($text).'</blockquote>';
$text = '<blockquote>'.htmlspecialchars(trim($text)).'</blockquote>';
}
if($image) {