@@ -4809,12 +4809,12 @@ module.exports = Backbone.Model.extend(_Styleable2.default).extend({
4809
4809
var config = this.sm.config || {};
4810
4810
var tagVarStart = escapeRegExp(config.tagVarStart || '{[ ');
4811
4811
var tagVarEnd = escapeRegExp(config.tagVarEnd || ' ]}');
4812
- var reg = new RegExp(tagVarStart + '(. *)' + tagVarEnd, 'g');
4812
+ var reg = new RegExp(tagVarStart + '([\\w\\d-] *)' + tagVarEnd, 'g');
4813
4813
scr = scr.replace(reg, function (match, v) {
4814
4814
// If at least one match is found I have to track this change for a
4815
4815
// better optimization inside JS generator
4816
4816
_this4.scriptUpdated();
4817
- return _this4.attributes[v];
4817
+ return _this4.attributes[v] || '' ;
4818
4818
});
4819
4819
4820
4820
return scr;
@@ -23266,7 +23266,7 @@ module.exports = function () {
23266
23266
plugins: plugins,
23267
23267
23268
23268
// Will be replaced on build
23269
- version: '0.12.59 ',
23269
+ version: '0.12.60 ',
23270
23270
23271
23271
/**
23272
23272
* Initializes an editor based on passed options
@@ -44311,7 +44311,7 @@ module.exports = Backbone.View.extend({
44311
44311
// In editor, I make use of setTimeout as during the append process of elements
44312
44312
// those will not be available immediatly, therefore 'item' variable
44313
44313
var script = document.createElement('script');
44314
- script.innerText = '\n setTimeout(function() {\n var item = document.getElementById(\'' + id + '\');\n if (!item) return;\n (function(){' + model.getScriptString() + '}.bind(item))()\n }, 1);';
44314
+ script.innerText = '\n setTimeout(function() {\n var item = document.getElementById(\'' + id + '\');\n if (!item) return;\n (function(){\n ' + model.getScriptString() + ';\n }.bind(item))()\n }, 1);';
44315
44315
view.scriptContainer.get(0).appendChild(script);
44316
44316
},
44317
44317
0 commit comments