1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-18 23:31:31 +00:00

properly escape comment links

This commit is contained in:
Andrew Dolgov
2012-10-22 01:22:44 +04:00
parent 5c56897349
commit 6e577ba157
2 changed files with 6 additions and 6 deletions

View File

@@ -3352,14 +3352,14 @@
if ($num_comments > 0) {
if ($line["comments"]) {
$comments_url = $line["comments"];
$comments_url = htmlspecialchars($line["comments"]);
} else {
$comments_url = $line["link"];
$comments_url = htmlspecialchars($line["link"]);
}
$entry_comments = "<a target='_blank' href=\"$comments_url\">$num_comments comments</a>";
} else {
if ($line["comments"] && $line["link"] != $line["comments"]) {
$entry_comments = "<a target='_blank' href=\"".$line["comments"]."\">comments</a>";
$entry_comments = "<a target='_blank' href=\"".htmlspecialchars($line["comments"])."\">comments</a>";
}
}