[#465] Sanitize header name on SlickGrid view
Change logic of sanitizing. Previously either original value or content of element with matching selector was used as column header. After this change original value with applied encoding of html entities will be used
This commit is contained in:
parent
10f115f778
commit
24388b7e6c
@ -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){
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user