mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-02 22:00:34 +01:00
Merge branch 'develop' into activitypub
This commit is contained in:
@@ -27,13 +27,10 @@ let sanitizeConfig = {
|
||||
source: ['type', 'src', 'srcset', 'sizes', 'media', 'height', 'width'],
|
||||
embed: ['height', 'src', 'type', 'width'],
|
||||
},
|
||||
globalAttributes: ['accesskey', 'class', 'contenteditable', 'dir',
|
||||
nonBooleanAttributes: ['accesskey', 'class', 'contenteditable', 'dir',
|
||||
'draggable', 'dropzone', 'hidden', 'id', 'lang', 'spellcheck', 'style',
|
||||
'tabindex', 'title', 'translate', 'aria-expanded', 'data-*',
|
||||
'tabindex', 'title', 'translate', 'aria-*', 'data-*',
|
||||
],
|
||||
allowedClasses: {
|
||||
...sanitize.defaults.allowedClasses,
|
||||
},
|
||||
};
|
||||
const allowedTypes = new Set(['default', 'plaintext', 'activitypub.note', 'activitypub.article']);
|
||||
|
||||
@@ -133,7 +130,7 @@ module.exports = function (Posts) {
|
||||
sanitizeConfig.allowedTags.forEach((tag) => {
|
||||
sanitizeConfig.allowedAttributes[tag] = _.union(
|
||||
sanitizeConfig.allowedAttributes[tag],
|
||||
sanitizeConfig.globalAttributes
|
||||
sanitizeConfig.nonBooleanAttributes
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user