how to keep this \r after sanitizer.Sanitize #343
Unanswered
karangiriKG
asked this question in
Q&A
Replies: 1 comment
-
There is no immediate way I can think of. The HTML parser does newline normalization, eliminating all CRs. If you want all newlines to be CRLF then of course you can normalize the resulting string after sanitizing. What's the use case? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
HTML DOM Events
The onclick Event
The onclick event triggers a function when an element is clicked on.
Click to trigger a function that will output "Hello World":
"%26lt%3bhtml%26gt%3b%3cbr /%3e\r\n%26lt%3bbody%26gt%3b%3cbr /%3e\r\n%3cbr /%3e\r\n%26lt%3bh1%26gt%3bHTML DOM Events%26lt%3b/h1%26gt%3b%3cbr /%3e\r\n%26lt%3bh2%26gt%3bThe onclick Event%26lt%3b/h2%26gt%3b%3cbr /%3e\r\n%3cbr /%3e\r\n%26lt%3bp%26gt%3bThe onclick event triggers a function when an element is clicked on.%26lt%3b/p%26gt%3b%3cbr /%3e\r\n%26lt%3bp%26gt%3bClick to trigger a function that will output %22Hello World%22%3a%26lt%3b/p%26gt%3b%3cbr /%3e\r\n%3cbr /%3e\r\n%3cbr /%3e\r\n%3cbr /%3e\r\n%26lt%3b/body%26gt%3b%3cbr /%3e\r\n%26lt%3b/html%26gt%3b"
While sanitizer.Sanitize(AboveString) it's remove \r
how to keep this \r after sanitizer.Sanitize
Beta Was this translation helpful? Give feedback.
All reactions