I am having a hard time in decoding this string in javascript ' I am using the following code _______________________ text="'"; var output=text.unescapeHTML(); document.write(output); _______________________ It shows ' I would like to decode it further to just a single quote since entity code for single quote = ' I tried to use the above function in a for loop but still it gives me same result. Any help would be greatly appreciated
You mean want to strip out that ampersand(& or &? Use the str_replace() function. http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_replace