diff options
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)); |