diff options
author | Andres Rey <[email protected]> | 2016-12-23 13:35:25 -0300 |
---|---|---|
committer | Andres Rey <[email protected]> | 2016-12-23 13:35:25 -0300 |
commit | c61b9799c86755aa2d60eff26cd63355b06581ee (patch) | |
tree | 19c5126b05da23143e5ea95443575bad985389ef /src | |
parent | 26dc6f0ec290d2e5a499372ab0abd5fdbbf57448 (diff) |
IF statements are hard
Diffstat (limited to 'src')
-rw-r--r-- | src/HTMLParser.php | 4 |
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)); |