Skip to content

Instantly share code, notes, and snippets.

@rashad612
Created March 25, 2014 12:25
Show Gist options
  • Save rashad612/9760822 to your computer and use it in GitHub Desktop.
Save rashad612/9760822 to your computer and use it in GitHub Desktop.
Dust.js decode html filter [ Browser ].
/**
* Dust.js decode html filter. Only in browser.
*/
(function(dust) {
dust.filters = dust.filters || {};
dust.filters.dh = function(value) {
var d = document.createElement('div');
d.innerHTML = value;
return d.textContent;
};
})(dust);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment