Browse Source

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

pull/912/head
Michael Vogel 7 years ago
parent
commit
7cba752f8a
1 changed files with 7 additions and 5 deletions
  1. +7
    -5
      mod/parse_url.php

+ 7
- 5
mod/parse_url.php 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) {


Loading…
Cancel
Save