Skip to content

Conversation

fit2bot
Copy link
Contributor

@fit2bot fit2bot commented Mar 26, 2025

Fixed: Allowed Tag

@@ -94,7 +94,7 @@ export default {
if (!content) return ''

return DOMPurify.sanitize(content, {
ALLOWED_TAGS: ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'li', 'strong', 'em', 'code', 'pre', 'blockquote', 'a'],
ALLOWED_TAGS: ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'li', 'strong', 'em', 'code', 'pre', 'blockquote', 'a', 'img'],
FORBID_TAGS: ['script', 'style', 'iframe', 'frame', 'object', 'embed'],
FORBID_ATTR: ['onerror', 'onload', 'onclick', 'onmouseover']
})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please upload this piece of code to see the difference between the given code snippet and any updated version released after September 2021, including changes in allowed HTML elements, attributes, or restrictions on external scripting elements such as scripts, frames, objects, embeds etc.

@fit2bot fit2bot requested a review from a team March 26, 2025 10:21
@ZhaoJiSen ZhaoJiSen merged commit c1fda10 into v4.8 Mar 26, 2025
3 of 4 checks passed
@ZhaoJiSen ZhaoJiSen deleted the pr@v4.8@fix_allowed_tag branch March 26, 2025 10:21
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants