String with special character is not displaying into email
-
26-05-2021 - |
Domanda
I have string like : '<New guest with special chars>'
Its displaying nice with rails view helper:
h '<New guest with special chars>' => '<New guest with special chars>'
but when I am sending this string to email then its not displaying and seems in firebug like :
'<new chars="" special="" with="" guest=""></new>'
because email treating it as html tag . Anyone has any idea, how to display it properly ?
Any ideas & suggestions would be very welcome .
Soluzione 2
Now I am able to get the string as desired . I using function to convert my string to escaped one .
CGI::escapeHTML(MY_STRING)
Altri suggerimenti
What Content-Type and Content-Disposition are you using to send the e-mail? http://en.wikipedia.org/wiki/MIME
If you sent an HTML e-mail, you need to encode your text correctly so that you use > instead of > etc. http://htmlhelp.com/reference/html40/entities/special.html