-
Notifications
You must be signed in to change notification settings - Fork 236
imprv: Restore semantic HTML tags lost in v7.0.10 refactoring #10707
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Add 11 semantic HTML tags: abbr, bdo, caption, cite, dfn, figure, figcaption, mark, small, time, wbr - Add attribute restrictions for new tags (abbr: title, bdo: dir, dfn: title, time: datetime) - Add comprehensive tests for all new tags and their attributes - Sort tags alphabetically for better maintainability Co-authored-by: yuki-takei <[email protected]>
Copilot
AI
changed the title
[WIP] Restore commonly-used semantic HTML tags in settings
Restore semantic HTML tags lost in v7.0.10 refactoring
Jan 13, 2026
Contributor
|
@copilot fix lint error on CI |
Co-authored-by: yuki-takei <[email protected]>
Contributor
Author
yuki-takei
approved these changes
Jan 13, 2026
15 tasks
Contributor
Merge Queue Status✅ The pull request has been merged at 487c52d This pull request spent 12 minutes 10 seconds in the queue, including 11 minutes 59 seconds running CI. Required conditions to merge
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
assertimport to test fileOriginal prompt
This section details on the original issue you should resolve
<issue_title>Restore commonly-used semantic HTML tags lost in v7.0.10 refactoring</issue_title>
<issue_description>Environment
Host
(Accessing https://{GROWI_HOST}/admin helps you to fill in above versions)
Client
Description
Several commonly-used semantic HTML tags that were available in v6.3.5 are missing from the recommended XSS whitelist in v7.0.10+. This affects users who rely on the "Recommended Settings" option in the Markdown Settings.
How to reproduce (再現手順)
What happens (症状)
<p>tags or stripped outWhat is the expected result (期待される動作)
These tags should be included in the recommended whitelist because:
Missing tags comparison
Tags lost in v7.0.10+
The following tags were available in v6.3.5 but are missing in v7.4.2:
<mark><small><abbr><cite><figure><figcaption><caption><time><dfn><bdo><wbr>Root cause
In commit 643e2f17b3 (2024-06-10), the whitelist was refactored from a custom tag list to using
hast-util-sanitize'sdefaultSchema.tagNames.Before (v6.3.5):
After (v7.0.10+):
The
hast-util-sanitizelibrary's default schema is intentionally minimal and doesn't include many semantic HTML tags - not because they're dangerous, but by design philosophy.Proposed solution
Add the following commonly-used, safe semantic tags back to the custom tag list in
apps/app/src/services/renderer/recommended-whitelist.ts:Tags NOT restored:
<dfn>,<bdo>,<wbr>- Less commonly used, can be added later if requestedI'd be happy to submit a PR if this approach is acceptable.</issue_description>
<agent_instructions>## Additional improvements to the proposed solution:
dfn,bdo, andwbr(these are also...💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.