When using libXML2 to parse HTML, by default, libXML2 normalizes and merges whitespace characters (including line breaks) on text nodes, which can cause line breaks within tags such as,, script, style, etc. to be removed or merged.
But for tags like, line breaks and whitespace are meaningful and need to be preserved.
Topic:
App & System Services
SubTopic:
General