mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-20 10:50:08 +03:00
Feature #3748: New handlebar helper htmlDecode
This commit is contained in:
parent
f93cce6903
commit
64ac4a3930
18
src/sunstone/public/app/templates/helpers/htmlDecode.js
Normal file
18
src/sunstone/public/app/templates/helpers/htmlDecode.js
Normal file
@ -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;
|
||||
});
|
Loading…
x
Reference in New Issue
Block a user