From 870ef6f6fc9216b83629a7cb32defc5db78070be Mon Sep 17 00:00:00 2001 From: logmanoriginal Date: Thu, 4 Aug 2016 21:42:06 +0200 Subject: [PATCH] [WordPress] Remove forms and improve script removal Some sites contain scripts like these, that were not captured by the previous implementation: --- bridges/WordPressBridge.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bridges/WordPressBridge.php b/bridges/WordPressBridge.php index 27afe0e4..0ba18517 100644 --- a/bridges/WordPressBridge.php +++ b/bridges/WordPressBridge.php @@ -49,8 +49,9 @@ class WordPressBridge extends BridgeAbstract { } function ClearContent($content) { - $content = preg_replace('//', '', $content); + $content = preg_replace('/]*>[^<]*<\/script>/', '', $content); $content = preg_replace('/
/', '', $content); return $content; }