summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndres Rey <[email protected]>2016-12-23 13:35:25 -0300
committerAndres Rey <[email protected]>2016-12-23 13:35:25 -0300
commitc61b9799c86755aa2d60eff26cd63355b06581ee (patch)
tree19c5126b05da23143e5ea95443575bad985389ef /src
parent26dc6f0ec290d2e5a499372ab0abd5fdbbf57448 (diff)
IF statements are hard
Diffstat (limited to 'src')
-rw-r--r--src/HTMLParser.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/HTMLParser.php b/src/HTMLParser.php
index 2a300dc..9cf0ca8 100644
--- a/src/HTMLParser.php
+++ b/src/HTMLParser.php
@@ -300,8 +300,8 @@ class HTMLParser
if ($href) {
// Replace links with javascript: URIs with text content, since
// they won't work after scripts have been removed from the page.
- if (strpos($href, 'javascript:' === 0)) {
- $text = $article->ownerDocument->createTextNode($link->textContent);
+ if (strpos($href, 'javascript:') === 0) {
+ $text = $article->createTextNode($link->textContent);
$link->parentNode->replaceChild($text, $link);
} else {
$link->setAttribute('href', $this->toAbsoluteURI($href, $pathBase, $scheme, $prePath));