mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-04-09 16:38:50 +00:00
[OtrkeyFinderBridge] Remove HTML in title (#2594)
* [OtrkeyFinderBridge] Provide a better example that actually returns results. * [OtrkeyFinderBridge] Remove HTML in filename.
This commit is contained in:
parent
7dcf09a876
commit
aa83a990d1
@ -10,7 +10,7 @@ class OtrkeyFinderBridge extends BridgeAbstract {
|
|||||||
array(
|
array(
|
||||||
'searchterm' => array(
|
'searchterm' => array(
|
||||||
'name' => 'Search term',
|
'name' => 'Search term',
|
||||||
'exampleValue' => 'Terminator',
|
'exampleValue' => 'Tatort',
|
||||||
'title' => 'The search term is case-insensitive',
|
'title' => 'The search term is case-insensitive',
|
||||||
),
|
),
|
||||||
'station' => array(
|
'station' => array(
|
||||||
@ -155,8 +155,14 @@ class OtrkeyFinderBridge extends BridgeAbstract {
|
|||||||
|
|
||||||
if ($file == null)
|
if ($file == null)
|
||||||
return null;
|
return null;
|
||||||
else
|
|
||||||
return trim($file->innertext);
|
// Sometimes there is HTML in the filename - we don't want that.
|
||||||
|
// To filter that out, enumerate to the node which contains the text only.
|
||||||
|
foreach($file->nodes as $node)
|
||||||
|
if ($node->nodetype == HDOM_TYPE_TEXT)
|
||||||
|
return trim($node->innertext);
|
||||||
|
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function buildContent(simple_html_dom_node $node) {
|
private function buildContent(simple_html_dom_node $node) {
|
||||||
|
Loading…
Reference in New Issue
Block a user