0

I have a HTML element with a data- attribute, which is encoded on the server with HttpUtility.HtmlAttributeEncode

So for example:

data-id="This is "an example" attribute">

Now I want to read the value in JavaScript and therefor I want to decode it. However, I can't seem to find any decoding functions in JavaScript (except decodeUri, but that doesn't work)

If there is an alternative to HttpUtility.HtmlAttributeEncode, that's also ok.

Michel
  • 23,085
  • 46
  • 152
  • 242

0 Answers0