dart-lang / pub-dev

The pub.dev website
https://pub.dev
BSD 3-Clause "New" or "Revised" License
775 stars 145 forks source link

Support `picture` tag for markdown pages #5923

Open ilfa opened 2 years ago

ilfa commented 2 years ago

Hi!

Can you keep picture tag for a markdown pages instead of omitting it?

isoos commented 2 years ago

@jonasfj: should we add this to package:sanitize_html?

ilfa commented 2 years ago

I can do pr in package:sanitize_html if it will help.

jonasfj commented 2 years ago

Yes, I'm down with adding this to package:sanitize_html, feel free to make a PR.


But I don't see this in: https://github.github.com/gfm/ OR: https://github.com/gjtorikian/html-pipeline/blob/main/lib/html/pipeline/sanitization_filter.rb

I'm not inclined to support tags not specified in GFM spec or sanitization_filter.rb, maybe github is now using a different sanitization library -- but then we should hopefully be able to find some canonical reference documentation or code for this behavior.

Linking to github user documentation does not seem like a good idea.

In short I would strongly prefer if package:sanitize_html is just an arbitrary set of rules we've "guess" to be okay. I would strongly prefer that the rules in the package are just an implementation of rules implemented somewhere else that we can reference to. Otherwise, next time someone asks for a "feature" we have to discuss it, and worse we might need to investigate the security implications.