Archive

Posts Tagged ‘createTextNode PHP DOM HTML htmlspecialchars htmlentity’

PHP DOM method gotcha!

July 2nd, 2009

Ok, so here is a “gotcha” with PHP’s DOM… if you use the method createTextNode(), and the string you pass happens to have HTML chars, the method will AUTOMATICALLY convert to html special chars. Guess they should call the method createTEXTnode instead!

Chris Fontes Programming