Difference between data displayed on page vs popover

Having slight differences in displaying data on my page vs displaying the same data in a popover.

I have a notes field in my form that is a textarea that gets inserted into my database. This stored data retains line endings of i assume \r (carriage return) or \n (new line), when i bind the data to the page it retains all the line endings perfectly, however if i bind the data into a popover it seems to strip these tags even if i use html. Obviously the data is not stored with an html br or p tag so that makes sense. Is there a way to stop the popover stripping the line endings though.

Perhaps it’s a CSS matter - eg using white-space: pre

1 Like

Too clever @TomD, exactly what was wrong for me. The class .popover was set to normal, added a css rule of .popover { white-space: pre-line; } and wham, fixed.

Thank you so much.

1 Like