Is A Dom Text Node Guaranteed To Not Be Interpreted As Html?
Does anyone know whether a DOM Node of type Text is guaranteed not be interpreted as HTML by the browser? More details follow. Background I'm building a simple web comment system f
Solution 1:
Yes, this is confirmed, to the extent that for what ever browser it wasn't, that browser would have a serious defect. A text node that rendered anything but text would be a contradiction. By using document.createTextNode("some string"); and appending that node, the string is guaranteed to be rendered as text.
Post a Comment for "Is A Dom Text Node Guaranteed To Not Be Interpreted As Html?"