Skip to content

Remove the click-to-copy data attribute #578

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
merged 3 commits into from
Jun 4, 2025

Conversation

chriszarate
Copy link
Member

  • Remove the click-to-copy data attribute from the GitHub Markdown block example.
    • This data attribute contained a copy of the code in the following code fence, which GitHub uses to implement click-to-copy. GitHub properly escapes this attribute using HTML entities, but our DOM parser (used to fix Markdown links) renders them unescaped. When this attribute contains HTML markup, it ends up being rendered on the page. We don't use this attribute, so we can just remove it.

cleanshot_2025-06-04_at_09 57 17_2x_720

@chriszarate chriszarate requested a review from maxschmeling June 4, 2025 16:31
@chriszarate chriszarate requested a review from a team as a code owner June 4, 2025 16:31
Copy link
Contributor

github-actions bot commented Jun 4, 2025

Test this PR in WordPress Playground.

@maxschmeling maxschmeling merged commit 0892af4 into trunk Jun 4, 2025
13 checks passed
@maxschmeling maxschmeling deleted the fix/remove-click-to-copy-attr branch June 4, 2025 16:38
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.

2 participants