1
0
mirror of https://github.com/moparisthebest/wallabag synced 2024-11-27 11:22:17 -05:00

[add] clean content articles in cron

This commit is contained in:
Nicolas Lœuillet 2014-03-07 14:49:36 +01:00
parent ded2c63312
commit 1ab567f6e3

View File

@ -1,5 +1,5 @@
<?php
error_reporting(E_ALL);
include_once 'inc/poche/global.inc.php';
include_once 'inc/poche/config.inc.php';
@ -43,10 +43,10 @@ foreach ($items as $item) {
$body = $content['rss']['channel']['item']['description'];
// // clean content from prevent xss attack
// $config = HTMLPurifier_Config::createDefault();
// $purifier = new HTMLPurifier($config);
// $title = $purifier->purify($title);
// $body = $purifier->purify($body);
$config = HTMLPurifier_Config::createDefault();
$purifier = new HTMLPurifier($config);
$title = $purifier->purify($title);
$body = $purifier->purify($body);
$store->updateContentAndTitle($item['id'], $title, $body, $user_id);