What inline html styles does GitHub hold accept?

This gives a fairly detailed description of how HTML elements are interpreted in markdowns. But this does not discuss styles.

So far, the only thing I can get to work is the width of the image.

  1. I can’t find a list of what is accepted / displayed anywhere
  2. It looks like the attribute is style="....."completely ignored.
  3. I can't even find a list of deprecated style attributes (as opposed to attribute style style=...)

https://gist.github.com/abalter/46df1b79e9f429342972477d7c20cebc

EDIT
Change spanat divboth divlocated in the white list in the comments below @waylan @chris answer.

EDIT 2
It seems that Firefox and Chrome no longer display any style attributes .

+13
source share
1 answer

After GitHub converts Markdown to HTML ,

HTML is cleaned aggressively removing things that can harm you and your family, such as tags script, attributes and inline styles class, or id. See Cleaning Filter for a complete whitelist.

You are right: tags are stylenot included in the white list. They are ignored.

. , . Ruby.

+9

Source: https://habr.com/ru/post/1680434/


All Articles