Answers for "js escape ampersand"

1

js escape ampersand

yourString.replace("&", "\u0026")
// or if you want to use it in backend, do like this
yourString.replace("&","\\u0026")
// and in the backend just replace it with "&" again
Posted by: Guest on August-04-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language