Last modified: 2006-01-30 03:42:59 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T3284, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 1284 - Diffs in RSS, Atom feeds missing stylesheet
Diffs in RSS, Atom feeds missing stylesheet
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Special pages (Other open bugs)
unspecified
All other
: Normal minor with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-01-08 04:27 UTC by Shantanu Oak
Modified: 2006-01-30 03:42 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
patch to add default stylesheet to feed (988 bytes, patch)
2006-01-06 08:50 UTC, P. K. CHAN, Esq.
Details
Patch to apply default stylesheet to RSS feed (990 bytes, patch)
2006-01-06 09:08 UTC, P. K. CHAN, Esq.
Details
Experimental XSL stylesheet to apply to diff HTML to inline styles (1.47 KB, text/plain)
2006-01-30 03:37 UTC, Brion Vibber
Details

Description Shantanu Oak 2005-01-08 04:27:48 UTC
When I subscribe to the RSS feed of the difference page, the red color text in
comparing Differences Between Revisions does not appear in RED in the feed. It
displays in black and it is hard to know what has changed. Though on the webpage
it is very easy to check only the RED color text.
Comment 1 P. K. CHAN, Esq. 2006-01-06 08:50:29 UTC
Created attachment 1267 [details]
patch to add default stylesheet to feed

Attempt to apply main.css of the default stylesheet to feed.
Comment 2 P. K. CHAN, Esq. 2006-01-06 09:06:50 UTC
Comment on attachment 1267 [details]
patch to add default stylesheet to feed

Sorry, submitted wrong patch.
Comment 3 P. K. CHAN, Esq. 2006-01-06 09:08:04 UTC
Created attachment 1268 [details]
Patch to apply default stylesheet to RSS feed

Attempt to apply default stylesheet to RSS feed by add a style element to
includes/Feed.php .
Comment 4 Brion Vibber 2006-01-06 20:34:10 UTC
How reliable is this?

Technically, <style> is only legal inside the <head> portion of an HTML document, so 
this would apparently produce invalid HTML fragments.

More seriously, importing the entire offsite stylesheet in each post could be rather 
disruptive for inline display of the feed in a web-based aggregator.
Comment 5 Alan Tam 2006-01-07 15:58:21 UTC
(In reply to comment #4)
> How reliable is this?

RSS readers should have HTTP access (e.g. correct proxy settings). There are
cases it does not support @import - maybe it is better to use <link
rel="stylesheet">. Anyway, having some probabilty to work is better than always
failing.


> Technically, <style> is only legal inside the <head> portion of an HTML
document, so 
> this would apparently produce invalid HTML fragments.

Agree, but probably many RSS clients support quirks-mode. Otherwise, we cannot
specify styles other than using the style attribute, since boh <style> and
<link> are valid only in <head>.


> More seriously, importing the entire offsite stylesheet in each post could be
rather 
> disruptive for inline display of the feed in a web-based aggregator.

I am equally preferable to inlining the styles, but doing otherwise made it easy
to customize by choosing another default style. How do you feel like spining off
a css file specifically for diffs?
Comment 6 Brion Vibber 2006-01-30 03:37:58 UTC
Created attachment 1331 [details]
Experimental XSL stylesheet to apply to diff HTML to inline styles

Just for "fun" I tried whipping up an XSLT stylesheet to apply the styles
inline. This is kind of ugly; hopefully there's a nicer way of doing it. PHP 5
includes an XSLT extension, but doesn't compile it in by default (sigh).

In CVS HEAD I just applied a nice simple regex hack in
SpecialRecentchanges.php, which is sufficient for the moment.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links