tao-test/app/taoQtiItem/views/js/qtiXmlRenderer/renderers/Img.js

16 lines
406 B
JavaScript

define(['lodash', 'tpl!taoQtiItem/qtiXmlRenderer/tpl/element'], function(_, tpl){
'use strict';
return {
qtiClass : 'img',
template : tpl,
getData : function(item, data) {
data.attributes = _.mapValues(data.attributes, function (val) {
return _.isString(val) ? _.escape(val) : val;
});
return data;
}
};
});