Monday, November 10, 2008

with the php domdocument class was getting the following error:

Warning: main() [function.main]: unterminated entity reference 64-bit

this error was occurring when trying to set the name of an anchor element ... the same error popped up when setting both within the constructor and through the nodeValue method. I haven't tested the solution via the constructor, but by wrapping the value with the built-in htmlspecialchars(), I solved this error

i.e.:
$anchornode = $doc->createElement('a');
$anchornode->nodeValue = htmlspecialchars("$somevalue");
Post a Comment