mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2024-11-29 14:48:52 +03:00
core: Apply changes to fix broken Travis builds
Travis-CI recently got updated, which causes existing builds to fail. For example: https://travis-ci.org/RSS-Bridge/rss-bridge/builds/507568117 Indenting multi-line arguments of functions fixes it.
This commit is contained in:
parent
684558e276
commit
88aae6fd95
2 changed files with 23 additions and 20 deletions
|
@ -207,14 +207,15 @@ EOD
|
||||||
* @return string Contents as simplehtmldom object.
|
* @return string Contents as simplehtmldom object.
|
||||||
*/
|
*/
|
||||||
function getSimpleHTMLDOM($url,
|
function getSimpleHTMLDOM($url,
|
||||||
$header = array(),
|
$header = array(),
|
||||||
$opts = array(),
|
$opts = array(),
|
||||||
$lowercase = true,
|
$lowercase = true,
|
||||||
$forceTagsClosed = true,
|
$forceTagsClosed = true,
|
||||||
$target_charset = DEFAULT_TARGET_CHARSET,
|
$target_charset = DEFAULT_TARGET_CHARSET,
|
||||||
$stripRN = true,
|
$stripRN = true,
|
||||||
$defaultBRText = DEFAULT_BR_TEXT,
|
$defaultBRText = DEFAULT_BR_TEXT,
|
||||||
$defaultSpanText = DEFAULT_SPAN_TEXT){
|
$defaultSpanText = DEFAULT_SPAN_TEXT){
|
||||||
|
|
||||||
$content = getContents($url, $header, $opts);
|
$content = getContents($url, $header, $opts);
|
||||||
return str_get_html($content,
|
return str_get_html($content,
|
||||||
$lowercase,
|
$lowercase,
|
||||||
|
@ -256,15 +257,16 @@ $defaultSpanText = DEFAULT_SPAN_TEXT){
|
||||||
* @return string Contents as simplehtmldom object.
|
* @return string Contents as simplehtmldom object.
|
||||||
*/
|
*/
|
||||||
function getSimpleHTMLDOMCached($url,
|
function getSimpleHTMLDOMCached($url,
|
||||||
$duration = 86400,
|
$duration = 86400,
|
||||||
$header = array(),
|
$header = array(),
|
||||||
$opts = array(),
|
$opts = array(),
|
||||||
$lowercase = true,
|
$lowercase = true,
|
||||||
$forceTagsClosed = true,
|
$forceTagsClosed = true,
|
||||||
$target_charset = DEFAULT_TARGET_CHARSET,
|
$target_charset = DEFAULT_TARGET_CHARSET,
|
||||||
$stripRN = true,
|
$stripRN = true,
|
||||||
$defaultBRText = DEFAULT_BR_TEXT,
|
$defaultBRText = DEFAULT_BR_TEXT,
|
||||||
$defaultSpanText = DEFAULT_SPAN_TEXT){
|
$defaultSpanText = DEFAULT_SPAN_TEXT){
|
||||||
|
|
||||||
Debug::log('Caching url ' . $url . ', duration ' . $duration);
|
Debug::log('Caching url ' . $url . ', duration ' . $duration);
|
||||||
|
|
||||||
// Initialize cache
|
// Initialize cache
|
||||||
|
|
|
@ -26,9 +26,10 @@
|
||||||
* already removes some of the tags (search for `remove_noise` in simple_html_dom.php).
|
* already removes some of the tags (search for `remove_noise` in simple_html_dom.php).
|
||||||
*/
|
*/
|
||||||
function sanitize($html,
|
function sanitize($html,
|
||||||
$tags_to_remove = array('script', 'iframe', 'input', 'form'),
|
$tags_to_remove = array('script', 'iframe', 'input', 'form'),
|
||||||
$attributes_to_keep = array('title', 'href', 'src'),
|
$attributes_to_keep = array('title', 'href', 'src'),
|
||||||
$text_to_keep = array()){
|
$text_to_keep = array()){
|
||||||
|
|
||||||
$htmlContent = str_get_html($html);
|
$htmlContent = str_get_html($html);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue