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:
@@ -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){
|
||||||
|
|||||||
Reference in New Issue
Block a user