I have never come across this before. I edit html etc in a text editor and naturally keep my code well presented with new lines and tabs etc.
A problem has arisen now though, when accessing the child elements of a node, new line characters in my source are being counted as nodes
So instead of firstChild returning the first element of a parent, it returns a node for "/n". Removing the new line in my source gets rid of this but I don't want to have all my child nodes on the same line in the source. This is a uni project so code needs to be presentable.
How can I stop special chars being added to the Dom? Is it to do with charset meta maybe?
(hope you understand what I mean lol)
A problem has arisen now though, when accessing the child elements of a node, new line characters in my source are being counted as nodes

So instead of firstChild returning the first element of a parent, it returns a node for "/n". Removing the new line in my source gets rid of this but I don't want to have all my child nodes on the same line in the source. This is a uni project so code needs to be presentable.
How can I stop special chars being added to the Dom? Is it to do with charset meta maybe?
(hope you understand what I mean lol)