mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2025-07-25 07:45:29 -04:00
Sanitize HTML code
using DOMPurify v1.0.2 Fixes https://github.com/PrivateBin/PrivateBin/issues/183
This commit is contained in:
parent
bccb349226
commit
b6d7d56774
4 changed files with 8 additions and 3 deletions
|
@ -1761,8 +1761,9 @@ jQuery.PrivateBin = function($, sjcl, Base64, RawDeflate) {
|
|||
tables: true,
|
||||
tablesHeaderId: true
|
||||
});
|
||||
// let showdown convert the HTML and sanitize HTML *afterwards*!
|
||||
$plainText.html(
|
||||
converter.makeHtml(text)
|
||||
DOMPurify.sanitize(converter.makeHtml(text), {SAFE_FOR_JQUERY: true})
|
||||
);
|
||||
// add table classes from bootstrap css
|
||||
$plainText.find('table').addClass('table-condensed table-bordered');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue