Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix utf-8 encoding problem #19

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Next Next commit
Update HtmlPageCrawler.php
Replace `_root` by constant `self::FRAGMENT_ROOT_TAGNAME`
  • Loading branch information
shtse8 authored Feb 27, 2017
commit 8da101889fdbd72f220b1acaeb64b15f76a4a301
2 changes: 1 addition & 1 deletion src/HtmlPageCrawler.php
Original file line number Diff line number Diff line change
@@ -887,7 +887,7 @@ public function saveHTML()
return $this->getDOMDocument()->saveHTML();
} else {
$doc = new \DOMDocument('1.0', 'UTF-8');
$root = $doc->appendChild($doc->createElement('_root'));
$root = $doc->appendChild($doc->createElement(self::FRAGMENT_ROOT_TAGNAME));
foreach ($this as $node) {
$root->appendChild($doc->importNode($node, true));
}