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

View File

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