From 96391117a21ae32d8bbf460f6daabef3a7a82f96 Mon Sep 17 00:00:00 2001 From: zPlus <--> Date: Sat, 8 Oct 2016 12:25:43 +0200 Subject: [PATCH] rss.php: avoid strings with special chars being rejected by SimpleXMLElement --- rss.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rss.php b/rss.php index 6c21d448..3abb4f6c 100644 --- a/rss.php +++ b/rss.php @@ -62,12 +62,12 @@ foreach ($posts as $post) // 'r' ยป RFC 2822 formatted date (Example: Thu, 21 Dec 2000 16:01:07 +0200) $date = date ('r', strtotime ($post['created'])); - $item->addChild ('title', $post['title']); - $item->addChild ('description', $description); + $item->addChild ('title', htmlspecialchars ($post['title'])); + $item->addChild ('description', htmlspecialchars ($description)); $item->addChild ('link', $link); $item->addChild ('freepostLink', $freepost_link); $item->addChild ('pubDate', $date); - $item->addChild ('author', $post['username']); + $item->addChild ('author', htmlspecialchars ($post['username'])); } // Output RSS