DocumentBuilder.InsertHTML ignores newlines

Unlike most browsers, the InsertHTML method of DocumentBuilder collapses new lines (e.g. \r\n ) to a single space. I had expected it to respect them.

Is this intended behaviour or is it a bug?

Hello

Thank you for your request. “\r” and “\n” it is not HTML special characters. For example you can use the following HTML tag to break line
<br /> instead of "\r\n".
In case of using “\r” and “\n” you should use DocumentBuilder.Write method.
Best regards,

Thanks Andrey,

The use case for us is sending html from the browser to the server for printing, so we can manually replace \r\n with
tags.

Will