The sanitizer is currently configured to behave like a post-parsing DOM operation, meaning for example that sanitizing a<!--comment-->b to remove comments would create two text nodes (a and b).
However, when the sanitizer is streaming and works as part of the parser - does that still makes sense?
In the above example, the comment is not inserted in the first place, and therefore when inserting b we get to the insert a character algorithm which tries to compact the text nodes by adding this one to the previous one.
To make the sanitizer behave like post-processing in terms of text nodes, we'd need special behavior in that part of the parser, or some such.
The sanitizer is currently configured to behave like a post-parsing DOM operation, meaning for example that sanitizing
a<!--comment-->bto remove comments would create two text nodes (aandb).However, when the sanitizer is streaming and works as part of the parser - does that still makes sense?
In the above example, the comment is not inserted in the first place, and therefore when inserting
bwe get to the insert a character algorithm which tries to compact the text nodes by adding this one to the previous one.To make the sanitizer behave like post-processing in terms of text nodes, we'd need special behavior in that part of the parser, or some such.