mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2024-11-23 01:55:27 +03:00
[WordPress] Remove forms and improve script removal
Some sites contain scripts like these, that were not captured by the previous implementation: <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
This commit is contained in:
parent
2c41ed550d
commit
870ef6f6fc
1 changed files with 2 additions and 1 deletions
|
@ -49,8 +49,9 @@ class WordPressBridge extends BridgeAbstract {
|
|||
}
|
||||
|
||||
function ClearContent($content) {
|
||||
$content = preg_replace('/<script.*\/script>/', '', $content);
|
||||
$content = preg_replace('/<script[^>]*>[^<]*<\/script>/', '', $content);
|
||||
$content = preg_replace('/<div class="wpa".*/', '', $content);
|
||||
$content = preg_replace('/<form.*\/form>/', '', $content);
|
||||
return $content;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue