implemented dispatcher commands

This commit is contained in:
Borys Levytskyi
2015-04-03 18:55:39 +03:00
parent d301d0c317
commit 8e5be22fe3
6 changed files with 136 additions and 54 deletions

View File

@@ -39,6 +39,9 @@
};
HtmlBuilder.createElement = function(template, model) {
should.beString(template, "template")
var regex = /(?:{([^}]+)})/g, html;
if(model == null){
@@ -70,6 +73,12 @@
}
HtmlBuilder.escapeHtml = function(html) {
if(html == null) {
return html;
}
should.beString(html);
return html
.replace(/&/g, "&")
.replace(/</g, "&lt;")