mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-20 20:02:38 +09:00
Feature #3748: New handlebar helper htmlDecode
This commit is contained in:
1 parent
f93cce6903
commit
64ac4a3930
1 file changed
+18
@@ -0,0 +1,18 @@
|
||||
define(function(require) {
|
||||
/**
|
||||
* Decodes an escaped html string back to html. For example,
|
||||
* "<p>This is a test</p>" -->
|
||||
* "<p>This is a test</p>"
|
||||
*/
|
||||
|
||||
var Handlebars = require('hbs/handlebars');
|
||||
var TemplateUtils = require('utils/template-utils');
|
||||
|
||||
var htmlDecode = function(value, options) {
|
||||
return TemplateUtils.htmlDecode(value);
|
||||
};
|
||||
|
||||
Handlebars.registerHelper('htmlDecode', htmlDecode);
|
||||
|
||||
return htmlDecode;
|
||||
});
|
||||
Reference in new issue
Block a user