mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 09:46:22 +00:00
Allow b tag and style attribute
This commit is contained in:
@@ -55,13 +55,14 @@ class Markdown {
|
|||||||
|
|
||||||
// Sanitize use rinput before other plugins
|
// Sanitize use rinput before other plugins
|
||||||
this.md.use(sanitize, {
|
this.md.use(sanitize, {
|
||||||
allowedTags: ['iframe', 'input',
|
allowedTags: ['iframe', 'input', 'b',
|
||||||
'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'h7', 'h8', 'br', 'b', 'i', 'strong', 'em', 'a', 'pre', 'code', 'img', 'tt',
|
'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'h7', 'h8', 'br', 'b', 'i', 'strong', 'em', 'a', 'pre', 'code', 'img', 'tt',
|
||||||
'div', 'ins', 'del', 'sup', 'sub', 'p', 'ol', 'ul', 'table', 'thead', 'tbody', 'tfoot', 'blockquote',
|
'div', 'ins', 'del', 'sup', 'sub', 'p', 'ol', 'ul', 'table', 'thead', 'tbody', 'tfoot', 'blockquote',
|
||||||
'dl', 'dt', 'dd', 'kbd', 'q', 'samp', 'var', 'hr', 'ruby', 'rt', 'rp', 'li', 'tr', 'td', 'th', 's', 'strike', 'summary', 'details'
|
'dl', 'dt', 'dd', 'kbd', 'q', 'samp', 'var', 'hr', 'ruby', 'rt', 'rp', 'li', 'tr', 'td', 'th', 's', 'strike', 'summary', 'details'
|
||||||
],
|
],
|
||||||
allowedAttributes: {
|
allowedAttributes: {
|
||||||
'*': [
|
'*': [
|
||||||
|
'style',
|
||||||
'abbr', 'accept', 'accept-charset',
|
'abbr', 'accept', 'accept-charset',
|
||||||
'accesskey', 'action', 'align', 'alt', 'axis',
|
'accesskey', 'action', 'align', 'alt', 'axis',
|
||||||
'border', 'cellpadding', 'cellspacing', 'char',
|
'border', 'cellpadding', 'cellspacing', 'char',
|
||||||
|
|||||||
Reference in New Issue
Block a user