Skip to content
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

Support limited use of the HTML 'style' attribute #192

Closed
mhelvens opened this issue Apr 30, 2015 · 15 comments
Closed

Support limited use of the HTML 'style' attribute #192

mhelvens opened this issue Apr 30, 2015 · 15 comments

Comments

@mhelvens
Copy link

I've seen a number of specific feature requests about styling, such as this one about color. But surprisingly, I could find none regarding the actual HTML style attribute.

That attribute is currently disallowed by the sanitization filter. I agree that full use of the style attribute would be too powerful - positioning and sizing properties might mess up the whole layout.

I propose that a 'css whitelist' is created, allowing limited use of the style attribute. I'm sure many developers would like to be able to use color, border, padding, and so on, to improve the style of their documentation.

(PS: This issue was originally posted on github/markup, but it seems to belongs here instead.)

@harlanhaskins
Copy link

👍

@shabnams
Copy link

shabnams commented Jun 4, 2015

Yes please. Color would be great.

@zackphilipps
Copy link

👍

@jch
Copy link
Contributor

jch commented Aug 4, 2015

Closing because we have no plans to support this.

@jch jch closed this as completed Aug 4, 2015
@peterflynn
Copy link

@jch Curious for the rationale? Does GitHub have any other path in mind for getting colored text in wiki content?

@jch
Copy link
Contributor

jch commented Aug 4, 2015

@peterflynn your wiki suggestion is a good one, but it's an application concern, not a library one. While GitHub does use html-pipeline internally, this isn't a good place to capture feature suggestions. This can be achieved today by customizing the upstream sanitization filter to be different for a specific pipeline one would like to whitelist.

I recommend writing in at https://github.com/contact if you have ideas about how our wiki's should change. Hope that helps!

@mhelvens
Copy link
Author

mhelvens commented Aug 4, 2015

I'm a bit confused. This repo is definitely the place where specific HTML tags are whitelisted, and it seems like an obvious place to whitelist further markup. I initially put this feature request in github/markup, but they closed the issue because they do "not perform the HTML sanitization".

The suggestion to contact GitHub privately seems absurd. Isn't GitHub all about openly discussing this kind of thing? And that very contact form directs us to open an issue for markup related stuff.

@h-h-h-h
Copy link

h-h-h-h commented Aug 8, 2015

👍

@ericnewton76
Copy link

Best option is to santize the style attribute in html, however there's another route, where you simply invent another markdown tag for color: {fg:blue}blue foreground{/fg:blue} {bg:red}red background{/bg:red} {fg:#ccc}Silver showing support for color numbers{/fg:#ccc}

@ghost
Copy link

ghost commented Oct 16, 2015

@mhelvens you are right. When GitHub tells us to create issue at html-pipeline
repo, then @jch tells us to contact GitHub, one party is wrong.

@jch is especially suspicious because he is a GitHub employee. Why is an
employee essentially blowing us off with http://github.com/contact when he owns
the very repo that this issue concerns? Plus his rationale makes no sense:

This can be achieved today by customizing the upstream sanitization filter

This repo is the upstream filter, so what he is saying is absurd. Please
GitHub, get your house in order.

@jeffpeiyt
Copy link

the white background in grey table rows could be improved. would be great that user can overwrite their css at least to enable transparent PNG...
http://stackoverflow.com/questions/33154030/remove-background-color-on-image-inside-markdown-table

@devbharat
Copy link

So, where do we stand here?

@0xced
Copy link

0xced commented Oct 1, 2016

A few days ago, I wrote an issue with a very long log dump. I had prepared it with different colors highlighting important points to be easier to comprehend but only the bold formatting remained. ☹️

Could you please reconsider having some basic support for colors?

@abrist
Copy link

abrist commented Feb 10, 2017

Color support would be fantastic. Especially for all of us that write shell code with ansi.

@mhelvens
Copy link
Author

Just FYI: This feature request was not just about color.

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

No branches or pull requests