Skip to content

Commit

Permalink
allow class for div as well
Browse files Browse the repository at this point in the history
  • Loading branch information
savikko committed Jul 29, 2017
1 parent 2825e71 commit 91dad73
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion public/javascripts/openKB.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,8 @@ $(document).ready(function(){
'table', 'thead', 'caption', 'tbody', 'tr', 'th', 'td', 'pre', 'img', 'iframe'
],
allowedAttributes: {
iframe: ['class', 'id', 'type', 'width', 'height', 'src', 'frameborder']
iframe: ['class', 'id', 'type', 'width', 'height', 'src', 'frameborder'],
div: ['class']
}
});

Expand Down
3 changes: 2 additions & 1 deletion routes/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,8 @@ exports.sanitizeHTML = function(html){
'table', 'thead', 'caption', 'tbody', 'tr', 'th', 'td', 'pre', 'img', 'iframe'
],
allowedAttributes: {
iframe: ['class', 'id', 'type', 'width', 'height', 'src', 'frameborder']
iframe: ['class', 'id', 'type', 'width', 'height', 'src', 'frameborder'],
div: ['class']
}
});
};
Expand Down

0 comments on commit 91dad73

Please sign in to comment.