markup icon indicating copy to clipboard operation
markup copied to clipboard

[Enhancement] Allow rendering `~~~HTML`s (like `~~~CSV`s and `~~~Mermaid`s).

Open RokeJulianLockhart opened this issue 1 year ago • 14 comments

When a preformatted block (a <pre> or ```) is intelligently considered to contain HTML, or (especially) when a fenced code block explicitly states that it contains HTML, like ```HTML, its content should render if it does not contain disallowed content (per gjtorikian/html-pipeline/blob/11cec3d43cab9f6beddd95bda40ad6ac654fe2f8/lib/html/pipeline/sanitization_filter.rb#L44-L95 ^1). If it contains disallowed code, ideally that code should be (with a notification) merely not executed. However, I would understand if the option to render were disallowed too, if that were too difficult to implement for a reason unbeknownst to me.

I want this because I frequently want to cite a section of a static website in issues so that I and the viewer don't have to view a limited-resolution screenshot. I can already include a code block containing HTML, but a viewer of the issue must manually duplicate it to a local file and execute it, which isn't safe for them, and is a nuisance for us both.

Precedent exists for this in how Mermaid content already is, as github/docs/blob/f8992bc56c56b19e26af839b8fd427824cc99473/content/get-started/writing-on-github/working-with-advanced-formatting/creating-diagrams.md#creating-mermaid-diagrams explains.

RokeJulianLockhart avatar Jun 12 '24 13:06 RokeJulianLockhart

Stale issue message

github-actions[bot] avatar Aug 12 '24 12:08 github-actions[bot]

https://github.com/github/markup/issues/1812#issuecomment-2283802410

@GitHub-Actions, https://github.com/github/markup/issues/1811#issuecomment-2283818005

RokeJulianLockhart avatar Aug 12 '24 12:08 RokeJulianLockhart

Stale issue message

github-actions[bot] avatar Oct 13 '24 12:10 github-actions[bot]

https://github.com/github/markup/issues/1812#issuecomment-2408953687

https://github.com/github/markup/issues/1811#issuecomment-2283818005

RokeJulianLockhart avatar Oct 13 '24 13:10 RokeJulianLockhart

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Feb 14 '25 12:02 github-actions[bot]

https://github.com/github/markup/issues/1812#issuecomment-2659171595

@GitHub-Actions, this is stupid.

RokeJulianLockhart avatar Feb 14 '25 12:02 RokeJulianLockhart

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Apr 16 '25 12:04 github-actions[bot]

https://github.com/github/markup/issues/1812#issuecomment-2809387812

It remains active.

RokeJulianLockhart avatar Apr 16 '25 12:04 RokeJulianLockhart

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Jun 16 '25 12:06 github-actions[bot]

https://github.com/github/markup/issues/1812#issuecomment-2976401874

@github-actions, see https://github.com/github/markup/issues/1812#issuecomment-2809411630.

RokeJulianLockhart avatar Jun 16 '25 12:06 RokeJulianLockhart

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Aug 17 '25 12:08 github-actions[bot]

See https://github.com/github/markup/issues/1812#issuecomment-2976424898.

RokeJulianLockhart avatar Aug 17 '25 12:08 RokeJulianLockhart

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Oct 18 '25 12:10 github-actions[bot]