Is there a way to display a string in HTML with all of its escape sequences preserved?
For example:
eipt No. : 1995,\nmount 935\nAdm. : 17/06/2016
INSTRUCTIONS :
1) This card is valid only for the student's name & for the period indicated.
2) This Card is not transferable and must be produced whenever demanded.
3) In case of loss, the holder must notify the Principal immediately in writing.
4) If anyone finds this card, please return it to the Principal.
When I receive strings like this from an AJAX request, I set the value of a tag using:
$('#ExtractedText').text(response["text"]);
Everything works fine, but the string is not displayed in its raw form. Instead, it looks something like this:
https://i.sstatic.net/Ww7BT.png
How can I ensure that the string is displayed exactly as it was received, with all escape sequences intact?