Created
March 25, 2014 12:25
-
-
Save rashad612/9760822 to your computer and use it in GitHub Desktop.
Dust.js decode html filter [ Browser ].
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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