home » zplus/freepost.git
Author zPlus <--> 2016-10-08 10:25:43
Committer zPlus <--> 2016-10-08 10:25:43
Commit 9639111 (patch)
Tree c9b792f
Parent(s)

rss.php: avoid strings with special chars being rejected by SimpleXMLElement


commits diff: 00cdda3..9639111
1 file changed, 3 insertions, 3 deletionsdownload


Diffstat
-rw-r--r-- rss.php 6

Diff options
View
Side
Whitespace
Context lines
Inter-hunk lines
+3/-3 M   rss.php
index 6c21d44..3abb4f6
old size: 2K - new size: 2K
@@ -62,12 +62,12 @@ foreach ($posts as $post)
62 62 // 'r' » RFC 2822 formatted date (Example: Thu, 21 Dec 2000 16:01:07 +0200)
63 63 $date = date ('r', strtotime ($post['created']));
64 64
65 - $item->addChild ('title', $post['title']);
66 - $item->addChild ('description', $description);
65 + $item->addChild ('title', htmlspecialchars ($post['title']));
66 + $item->addChild ('description', htmlspecialchars ($description));
67 67 $item->addChild ('link', $link);
68 68 $item->addChild ('freepostLink', $freepost_link);
69 69 $item->addChild ('pubDate', $date);
70 - $item->addChild ('author', $post['username']);
70 + $item->addChild ('author', htmlspecialchars ($post['username']));
71 71 }
72 72
73 73 // Output RSS