HTML entities that will be decoded are: & becomes & (ampersand) " becomes " (double quote) ' becomes ' (single quote) < becomes < (less than) > becomes > (greater than) The htmlspecialchars_decode () function is the opposite of htmlspecialchars (). All of these can have different meanings inside a URL so need to be encoded. Hi, I'm using a HTML-escape library on my server-side to escape any user-input before delivering it to my Vue.js frontend to mitigate XSS attacks. A character encoding declaration is also needed to process non-ASCII characters entered by the user in forms, in URLs generated by scripts, and so forth. This article will look at how to decode the below string using JavaScript. There are a lot of letters and characters that have a glyph or accent added to the letter or character. Retrieve the position (X,Y) of an HTML element. If you arent working with HTML5 yet, youll want to use the following meta (outdated). Show All Tools Bookmark Share Feedback. In order to bypass this defence, bind your data into innerHTML. Is it possible to apply CSS to half of a character? Regards, Xiaoxin Sheng. How can I set the default value for an HTML