summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwn_ <[email protected]>2024-04-03 17:36:26 +0000
committerwn_ <[email protected]>2024-04-03 17:36:26 +0000
commit684721a181377915e42c7a04c1a099be12eb4a38 (patch)
tree4f219062fe62ea7d87aec85daf54309fa0504bea
parentcdc97d886cb7085f9c44a1796ee4bbbf57534d06 (diff)
Have Readability ignore/strip 'template' elements.
-rwxr-xr-xinit.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/init.php b/init.php
index 1deb1fc..591be6e 100755
--- a/init.php
+++ b/init.php
@@ -220,8 +220,9 @@ class Af_Readability extends Plugin {
try {
$r = new Readability(new Configuration([
- 'fixRelativeURLs' => true,
- 'originalURL' => $url,
+ 'FixRelativeURLs' => true,
+ 'OriginalURL' => $url,
+ 'ExtraIgnoredElements' => ['template'],
]));
if ($r->parse($tmp)) {