Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

call htmlspecialchars on $link otherwise the example breaks with a Qu…

…eryPathParseException when an URL contains an &
  • Loading branch information...
commit c65da3a3173dea18c3e10ceccdcfea9e18f00c2c 1 parent 5e54ea0
@yaph authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  examples/fetch_rss.php
View
2  examples/fetch_rss.php
@@ -35,7 +35,7 @@
$link = $item->next('link')->text();
// Do a little string building.
- $bullet = '<li><a href="' . $link . '">' . $title . '</a></li>';
+ $bullet = '<li><a href="' . htmlspecialchars($link, ENT_QUOTES, 'UTF-8') . '">' . $title . '</a></li>';
// Add it to the output document.
$out->append($bullet);

0 comments on commit c65da3a

Please sign in to comment.
Something went wrong with that request. Please try again.