FIX: Ignore styles the browser inlines on copied rich content - #108
Open
renato wants to merge 2 commits into
Open
FIX: Ignore styles the browser inlines on copied rich content#108renato wants to merge 2 commits into
renato wants to merge 2 commits into
Conversation
renato
force-pushed
the
restrict-pasted-styles
branch
from
August 17, 2026 17:58
476457e to
ce81e04
Compare
renato
force-pushed
the
restrict-pasted-styles
branch
from
August 17, 2026 18:06
ce81e04 to
9a6d6f5
Compare
ZogStriP
approved these changes
Aug 17, 2026
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
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.
Previously, the mark rules matched
color,background-color, andfont-*style properties on any pasted element, so the computed styles browsers inline onto copied rendered content (a mention's tint, a code span's colors) came back as authored[color]/[bgcolor]tags — both in the rich editor and, throughtoMarkdown(), on the classic composer'senable_rich_text_pastepath.This change only claims a bare
<span>holding exactly the single style declaration the cook itself writes, so cooked bbcode still round-trips while browser-inlined styling is ignored.