mirror of
https://github.com/twisterarmy/twister-phpbot.git
synced 2025-02-04 11:04:25 +00:00
decode special chars
This commit is contained in:
parent
96f0d63de2
commit
f4c3c399ce
@ -22,6 +22,8 @@ $db = new HabrRSSDb('habr_db.dat');
|
|||||||
foreach ($rss->channel->item as $item) {
|
foreach ($rss->channel->item as $item) {
|
||||||
$link = (string)$item->link;
|
$link = (string)$item->link;
|
||||||
$title = (string)$item->title;
|
$title = (string)$item->title;
|
||||||
|
// Note: habrahabr.ru does both special chars encoding and CDATA wrap
|
||||||
|
$title = htmlspecialchars_decode($title);
|
||||||
|
|
||||||
// get post id from link
|
// get post id from link
|
||||||
$id = (int)preg_replace('#[^\d]#', '', $link);
|
$id = (int)preg_replace('#[^\d]#', '', $link);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user