parse url: Characters like < and > has to be escaped when showing the parsed output.
This commit is contained in:
parent
046096e705
commit
7cba752f8a
1 changed files with 7 additions and 5 deletions
|
@ -327,12 +327,14 @@ function parse_url_content(&$a) {
|
||||||
|
|
||||||
if($url && $title && $text) {
|
if($url && $title && $text) {
|
||||||
|
|
||||||
|
$title = str_replace(array("\r","\n"),array('',''),$title);
|
||||||
|
|
||||||
if($textmode)
|
if($textmode)
|
||||||
$text = '[quote]' . trim($text) . '[/quote]' . $br;
|
$text = '[quote]' . trim($text) . '[/quote]' . $br;
|
||||||
else
|
else {
|
||||||
$text = '<blockquote>' . trim($text) . '</blockquote><br />';
|
$text = '<blockquote>' . htmlspecialchars(trim($text)) . '</blockquote><br />';
|
||||||
|
$title = htmlspecialchars($title);
|
||||||
$title = str_replace(array("\r","\n"),array('',''),$title);
|
}
|
||||||
|
|
||||||
$result = sprintf($template,$url,($title) ? $title : $url,$text) . $str_tags;
|
$result = sprintf($template,$url,($title) ? $title : $url,$text) . $str_tags;
|
||||||
|
|
||||||
|
@ -381,7 +383,7 @@ function parse_url_content(&$a) {
|
||||||
if($textmode)
|
if($textmode)
|
||||||
$text = '[quote]'.trim($text).'[/quote]';
|
$text = '[quote]'.trim($text).'[/quote]';
|
||||||
else
|
else
|
||||||
$text = '<blockquote>'.trim($text).'</blockquote>';
|
$text = '<blockquote>'.htmlspecialchars(trim($text)).'</blockquote>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if($image) {
|
if($image) {
|
||||||
|
|
Loading…
Reference in a new issue