[FacebookBridge] Remove hidden elements
Hidden elements are used for error conditions and generally made visible using JavaScript. Since RSS-Bridge doesn't support JS, these error messages are shown in the final feed. For example: "It looks like you may be having problems playing this video. If so, please try restarting your browser." This commit removes all hidden elements to prevent error messages being added to the feed. - "It looks like you may be having problems playing this video. If so, please try restarting your browser."
This commit is contained in:
parent
7026684e34
commit
104ae2298e
1 changed files with 5 additions and 0 deletions
|
@ -589,6 +589,11 @@ EOD;
|
|||
}
|
||||
}
|
||||
|
||||
// Remove hidden elements (they are hidden anyway)
|
||||
foreach($content->find('.hidden_elem') as $subject) {
|
||||
$subject->outertext = '';
|
||||
}
|
||||
|
||||
$content = preg_replace(
|
||||
'/(?i)><div class=\"_3dp([^>]+)>(.+?)div\ class=\"[^u]+userContent\"/i',
|
||||
'',
|
||||
|
|
Loading…
Reference in a new issue