We are having an RTF field and Editors would be pasting small html snippets in it. Finally we are generating Json output using Newtonsoft json (Json.net) Serializer. Strangely I have come across an issue where our json is having \r\n in it. I have tried editing the html in RTF field not to contain any line breaks but somehow Tridion is formatting it back.
Input in RTF Field:
<center><strong>First Line</strong></center><center>Second Line</center><center>Third Line</center>
After Clicking of design or preview Tab of RTF field:
<center><strong>First Line</strong></center>
<center>Second Line</center>
<center>Third Line</center>
Final Json output:
"test":"<center><strong>First Line</strong></center>\r\n<center>Second Line</center>\r\n<center>Third Line</center>"
Is my understanding correct that Tridion is inserting line breaks or new line after closing of each html tag and hence the serializer is representing it as \r\n? Or is there something wrong?