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

Text colour from article might conflict with theme #741

Closed
lightonflux opened this issue Jul 2, 2014 · 5 comments
Closed

Text colour from article might conflict with theme #741

lightonflux opened this issue Jul 2, 2014 · 5 comments

Comments

@lightonflux
Copy link

E.g. If you save an article that has citation in grey text wallabags saves it as grey text, which can conflict with dark themes. Image

I don't know what the best fix would be. But stripping the text colour information from the text would give a good result.

@tcitworld
Copy link
Member

I guess we can make an option for this.
Maybe work this upstream with @fivefilters ? :)

@tcitworld tcitworld added this to the 1.8.0 milestone Jul 2, 2014
@fivefilters
Copy link

I'm assuming this is inline CSS, but I can't be sure - could it be markup that's made grey by Wallabag's own style rules? If it's inline CSS, we don't really do anything special to remove it unless you request &xss=1. That parameter should remove inline CSS through the use of htmLawed. Doesn't Wallabag use HTML Purifier? If it does, then I'm pretty sure you can configure it to remove inline CSS.

@tcitworld
Copy link
Member

This is indeed inline CSS for citations blocks, like here. The baggy theme from wallabag uses special rules for blockquote elements, but nothing to do with text color.
I don't think we want to delete all of CSS, though, we just want some rules (delete color font, delete special fonts, blink elements, ...).
I'll look at how does HTML Purifier handles this, since we do use it.
Thanks for reply.

@fivefilters
Copy link

Ah ok. In PDF Newspaper and Push to Kindle, we use HTML Purifier to only accept a certain set of HTML elements with only a few attributes allowed - the style attribute is not one of them, so inline CSS doesn't create a problem. In your case, you might want to look at HTMLPurifier_AttrTransform to see if you can change/remove certain style rules that appear in the style attribute without affecting the rest. Haven't attempted this myself, so not sure how easy it is.

@tcitworld tcitworld modified the milestones: 1.8.1, 1.8.0 Sep 28, 2014
@nicosomb nicosomb modified the milestones: 1.8.1, 1.8.2 Oct 29, 2014
@tcitworld tcitworld modified the milestones: 1.8.3, 1.8.2 Dec 22, 2014
@tcitworld tcitworld modified the milestones: 1.8.3, 1.9.1 Feb 10, 2015
@tcitworld tcitworld modified the milestones: 1.9.1, 1.9.2 May 22, 2015
@j0k3r
Copy link
Member

j0k3r commented Sep 15, 2015

This seems to be fixed in 2.0.0-alpha.0: http://v2.wallabag.org/view/13

@j0k3r j0k3r closed this as completed Sep 15, 2015
@j0k3r j0k3r modified the milestones: 2.0.0-alpha.1, 1.9.2 Sep 15, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants