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

c# - Unity IoC Lifetime per HttpRequest for UserStore -

Change the color of an oval at click in Java AWT -

I am trying to solve the error message 'incompatible ranks 0 and 1 in assignment' in a fortran 95 program. -