How do I use jQuery to decode HTML entities in a string?
Extend a String class:
String::decode = -> $('').html(this).text()
and use as method:
"<img src='myimage.jpg'>".decode()