Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Improve Markdown rendering#47074

Merged
felixfbecker merged 2 commits into
mainfrom
improve-markdown-rendering
Jan 30, 2023
Merged

Improve Markdown rendering#47074
felixfbecker merged 2 commits into
mainfrom
improve-markdown-rendering

Conversation

@felixfbecker

@felixfbecker felixfbecker commented Jan 30, 2023

Copy link
Copy Markdown
Contributor

This tweaks the new markdown renderer/sanitizer to allow more multimedia HTML like we use in our README and GitHub supports too.

Specifically:

  • allows <picture> for dark/light mode variations of images (this fixes our README reacting to light/dark theme)
    • There was a bug in bluemonday with <picture> I reported and was promptly fixed, so this PR also updates the version to include it
  • supports videos or GIF-like video loops and captions
  • makes cross-origin links open in new tabs
  • supports alignment on paragraphs

None of these allow to execute JS so should be all safe.

Test plan

Tested manually on our README

@cla-bot cla-bot Bot added the cla-signed label Jan 30, 2023
@felixfbecker felixfbecker requested a review from beyang January 30, 2023 07:35

@beyang beyang left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the changes!

@felixfbecker felixfbecker merged commit 3653442 into main Jan 30, 2023
@felixfbecker felixfbecker deleted the improve-markdown-rendering branch January 30, 2023 21:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants