dracoblue.net

htmlspecialchars_decode for Mootools

This is a short function for Mootools decoding a string containing html entities to text.

function htmlspecialchars_decode(text)
{
    var stub_object = new Element('span',{ 'html':text });
    var ret_val = stub_object.get('text');
    delete stub_object;
    return ret_val;
}

Remember that you usually have no use for that function, because every element of mootools has a .get('text') function, which does the same.

In javascript, mootools by
@ 06 Feb 2009, Comments at Reddit & Hackernews

Give something back

Were my blog posts useful to you? If you want to give back, support one of these charities, too!

Report hate in social media Campact e.V. With our technology and your help, we protect the oceans from plastic waste. Gesellschaft fur Freiheitsrechte e. V. The civil eye in the mediterranean

Recent Dev-Articles

Read recently

Recent Files

About