Html entities must be encoded in alt attribute of an image in HTML page. So
>
Decode HTML entities using JavaScript
Credits to The JavaScript Source.
EDIT: I changed the original code to only use innerHTML on a element, instead of innerHTML and value of a .
innerHTML
value