PHP DOMDocument | ends by null char (\u0) -


i noticed on url: http://www.bubbleroom.se/sv/kläder/kvinna/controlbody/bodys/body-nero there null character \u0 in tag id prodtext.

the whole document seems end null char when attempting extract else after character.


edit

the code "doesn't" work. works, not when there's null char in $html string

$dom = new domdocument; libxml_use_internal_errors(true); $dom->loadhtml($html); libxml_clear_errors();  return new domxpath($dom); 

i solved issue filtering html before creating xpath instance following code:

$html  = str_replace("\0", "", $html); 

Comments

Popular posts from this blog

php - How to serve a file for download on WordPress -

how to share virtual sharepoint server and get it in host windows and visual studio? -