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

Bug in allowed attributes #287

Closed
Narvey opened this issue Dec 12, 2017 · 3 comments
Closed

Bug in allowed attributes #287

Narvey opened this issue Dec 12, 2017 · 3 comments

Comments

@Narvey
Copy link

Narvey commented Dec 12, 2017

sanitization_filter.rb has attributes (including color) that are listed as allowed, but do not work in GitHub.

For example, if I do:

<hr color="orange" />

It looks like:


Which is clearly grey, not orange. Also in order for the color attribute to be really useful, we need the "font" tag.

I'm not able to test all the others exhaustively, but some others that are rather strange are "checked", "selected", "action", "accesskey". Since form-related tags aren't allowed, I'm not sure what possible use these could have. For these four only, I recommend removing them from the list.

@jantman
Copy link

jantman commented Dec 14, 2017

I'll say that I don't really care how we get there (i.e. whitelisted style options, whitelisted tags/attributes/whatever) but it's pretty important to me to be able to at least somehow set font and background color, especially in a HTML table (th/td).

@gjtorikian
Copy link
Owner

This gem is this gem, and has no guarantee of usage in GitHub text fields. GitHub has configured their whitelist differently.

@Epoizam
Copy link

Epoizam commented Mar 20, 2024

Protection my device please

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

4 participants