I have link generating web app. I\'d like to make it easy for users to email the links they create to others using gmail, yahoo mail, etc. Yahoo mail has a particular quirk
Here is how i do it:
run a window.escape on those chars: & ' " # > < \
window.escape
& ' " # > < \
run a encodeURIComponent on the full string
encodeURIComponent
it works for most of my case. though newline (\n) is still an issue, but I replace \n with space in my case and it worked fine.
\n