Specifically, what's the easiest and most idiomatic way to replace special XML characters in a string. E.g., what's the easiest and most idiomatic way to convert <Jack & Jill>
to <Jack & Jill>
.
If you are looking to escape the @
sign in a scala.html file, for instance, using Scala/Play, do @@
.
And give the person who provided this answer here How to print @ symbol in HTML with play framework (scala) an upvote.
I came across this page while looking for the above answer, so I just wanted to duplicate it here since other people may end up here as well.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With