1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-08-17 22:02:09 +02:00

[core] extract HTMLUtils methods to make them functions

Methods displayBridgeCard, sanitize, defaultImageSrcTo are now
functions in lib/html.php
getHelperButtinsFormat and getFormHeader are now anonymous functions
defined in displayBridgeCard

Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
This commit is contained in:
Pierre Mazière
2016-09-25 23:58:52 +02:00
parent f1fb95b257
commit 747be13849
7 changed files with 299 additions and 317 deletions

View File

@@ -59,7 +59,7 @@ class WorldOfTanksBridge extends BridgeAbstract {
debugMessage("loading page ".$item['uri']);
$articlePage = getSimpleHTMLDOMCached($item['uri']);
$content = $articlePage->find('.l-content', 0);
HTMLSanitizer::defaultImageSrcTo($content, self::URI);
defaultImageSrcTo($content, self::URI);
$item['title'] = $content->find('h1', 0)->innertext;
$item['content'] = $content->find('.b-content', 0)->innertext;
$item['timestamp'] = $content->find('.b-statistic_time', 0)->getAttribute("data-timestamp");