Merge pull request #498 from smotornyuk/465-sanitize-header-name-on-slickgrid-view

[#465] Sanitize header name on SlickGrid view
This commit is contained in:
Rufus Pollock 2016-04-09 11:23:32 +01:00
commit 906af6bee6

View File

@ -161,13 +161,7 @@ my.SlickGrid = Backbone.View.extend({
}
function sanitizeFieldName(name) {
var sanitized;
try{
sanitized = $(name).text();
} catch(e){
sanitized = '';
}
return (name !== sanitized && sanitized !== '') ? sanitized : name;
return $('<div>').text(name).html();
}
_.each(this.model.fields.toJSON(),function(field){