Page 1 of 1

Leaky text-centering on Sluggy Freelance feed?

Posted: 25 Apr 2013, 21:55
by atrus
On this feed:
http://feeds.feedburner.com/sluggy_freelance

Whenever an article from the feed is on-screen (collapsed or otherwise), all text on the page is centered, including titles, the feed listing, etc.

Running 1.7.8.

Re: Leaky text-centering on Sluggy Freelance feed?

Posted: 25 Apr 2013, 23:14
by Athanasius
I quickly had this issue when first trying out tt-rss. It's because Sluggy had a <body> tag with the text-align: center; attribute. Some might say they should put all the content inside a <div> with that attribute instead. As it is I just use a Stylish script to fix it back up:

Code: Select all

body {
  text-align: left !important;
}


NB: That Stylish script is set to only apply to my tt-rss instance. It's not set to apply to Sluggy, or any other site. I don't know if tt-rss itself could be made to do something similar, but perhaps the custom CSS could handle this, depending on the order of tt-rss CSS versus included feed content CSS.

Re: Leaky text-centering on Sluggy Freelance feed?

Posted: 25 Apr 2013, 23:54
by fox
Yeah the <body> thing inside an article is something that needs to be removed.

Re: Leaky text-centering on Sluggy Freelance feed?

Posted: 26 Apr 2013, 00:02
by fox
Okay, this looks like a problem with strip_harmful_tags() - for some reason getElementsByTagName("*") does not actually return *all* elements, but only most (?!) of them. Thanks, PHP.

So I changed that to xpath and now works properly.

https://github.com/gothfox/Tiny-Tiny-RS ... bac81b460c

Re: Leaky text-centering on Sluggy Freelance feed?

Posted: 26 Apr 2013, 00:40
by Athanasius
Confirmed working here, Stylish script disabled. Thanks :)

Re: Leaky text-centering on Sluggy Freelance feed?

Posted: 26 Apr 2013, 01:27
by atrus
fox wrote:Okay, this looks like a problem with strip_harmful_tags() - for some reason getElementsByTagName("*") does not actually return *all* elements, but only most (?!) of them. Thanks, PHP.

So I changed that to xpath and now works properly.

https://github.com/gothfox/Tiny-Tiny-RS ... bac81b460c

Lovely! Many thanks!