summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornashe <thomas@chauchefoin.fr>2017-05-30 00:14:31 +0200
committernashe <thomas@chauchefoin.fr>2017-05-30 00:14:31 +0200
commitf5b102d873aa85a14aad037d6a8e2911ddda35ea (patch)
treefedb56915e8189010edc0a1c4566d43df37b3f67
parent9022bab97250c7b6ad3a658197494c4ce5126da7 (diff)
downloadplanet-f5b102d873aa85a14aad037d6a8e2911ddda35ea.tar
planet-f5b102d873aa85a14aad037d6a8e2911ddda35ea.tar.gz
planet-f5b102d873aa85a14aad037d6a8e2911ddda35ea.tar.bz2
planet-f5b102d873aa85a14aad037d6a8e2911ddda35ea.tar.xz
planet-f5b102d873aa85a14aad037d6a8e2911ddda35ea.zip
Correctly escape attributes of OPML's entries
This should prevent any case of corruption of the XML document.
-rw-r--r--app/lib/lib.opml.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/lib/lib.opml.php b/app/lib/lib.opml.php
index 8676807..ecb71a8 100644
--- a/app/lib/lib.opml.php
+++ b/app/lib/lib.opml.php
@@ -95,8 +95,8 @@ class OpmlManager
$out.= '<dateModified>'.date('c').'</dateModified>'."\n";
$out.= '</head>'."\n";
$out.= '<body>'."\n";
- foreach ($opml->entries as $person){
- $out.= '<outline text="' . htmlspecialchars($person['name']) . '" htmlUrl="' . htmlspecialchars($person['website']) . '" xmlUrl="' . htmlspecialchars($person['feed']) . '" isDown="' . htmlspecialchars($person['isDown']) . '"/>'."\n";
+ foreach ($opml->entries as $person) {
+ $out.= '<outline text="' . htmlspecialchars($person['name'], ENT_QUOTES) . '" htmlUrl="' . htmlspecialchars($person['website'], ENT_QUOTES) . '" xmlUrl="' . htmlspecialchars($person['feed'], ENT_QUOTES) . '" isDown="' . htmlspecialchars($person['isDown'], ENT_QUOTES) . '"/>'."\n";
}
$out.= '</body>'."\n";
$out.= '</opml>';