Armageddon

pudge on 2005-03-18T18:57:01

Over at Slash Central, we are actually working on converting Slash -- including Slashdot -- over to XHTML + CSS.

I'm not kidding.

My current task is taking the code we have to massage your comment and journal text into somewhat reasonable HTML, and making it spit out perfectly valid XHTML. And then converting all existing comments to such valid XHTML.

I'm not kidding!

It's actually coming along well, better than I'd have thought. I took 1,000 random Slashdot comments and ran them through my code and, after fixing some bugs found in the process, got the number of XHTML errors from 7,000+ down to 0. And a side-by-side comparison shows them to still look mostly the same. There's a few small/necessary changes, like putting content inside an UL tag in an LI. Which was a HUGE pain.

A lot more to do, but the progress is encouraging.


Awesome!

Ovid on 2005-03-18T19:23:34

I actually think that's great news. Woo hoo! Will you let people apply their own stylesheets?

Re:Awesome!

pudge on 2005-03-18T19:48:20

At first, I doubt it. But if there's enough request for it, who knows?

Re:Awesome!

Dom2 on 2005-03-19T09:14:24

Applying your own stylesheets opens the potential for abuse, sadly. It's giving people complete control of the layout. What's to stop some troll from using a bit of absolute position to completely overlay the entire page with a picture of goatse?

I seem to recall that this sort of thing happened on advogato a while back, although not as offensive.

-Dom

Re:Awesome!

Yoz on 2005-03-22T00:40:58

Well, if you allow people to paste raw CSS into their own user prefs, the only people who see goatse are the ones who specifically asked for it. I don't see what the problem is.

Re:Awesome!

pudge on 2005-03-22T01:43:59

If we do it at all, it probably would only be in the form of allowing somone to point at a stylesheet URL. That should be sufficient, I think.

Re:Awesome!

Yoz on 2005-03-22T02:08:15

You're more likely to get the malicious-goatse-attack scenario by external pointing, unfortunately:

  1. Someone creates a nifty new stylesheet
  2. Stylesheet URL gets really popular
  3. Stylesheet suddenly gets switched to goatse, either by hacking or malicious owner

This also assumes that the URL can survive the continual Slashdotting of point 2, which is several times less likely than the above attack.

Re:Awesome!

pudge on 2005-03-22T04:20:44

It's not like we'd be keeping a public list of the stylesheets. If someone wants to link to their friend's stylesheet, that's their business.

Re:Awesome!

Dom2 on 2005-03-22T08:32:01

That all sounds better than what I had in mind -- allowing specification of style="" attributes. That really causes a problem because everybody gets to see it.

-Dom

Re:Awesome!

pudge on 2005-03-23T04:34:33

Oh, you mean so someone gets your style if they see your page? Yeah, we won't be doing that. For that, if we may decide to accept themes from the community, but we would have to host them.

oh my

hfb on 2005-03-19T08:58:29

Jarkko and I will both being looking up and watching for the signs that the end of the world has arrived. Next you're going to say that it installs on Solaris without a hitch! :D

Network IO

jk2addict on 2005-03-19T14:25:39

Aside from the usual it's-about-time comments, I'm extremely curious how this effects slashdot.org network bandwidth.

I've always found the 'it makes your bandwidth usage smaller' argument of XHTML/CSS to be an intersting one, especially when you look at the before and after numbers of just the file sizes.

Hopefully after the conversion we'll get a nice tech report on such geeky details. :-)

ALA's redesign of /.

Supercytro on 2005-03-20T13:21:36

Don't forget ALA's article on where they redesigned /. to be standards compliant CSS/XHTML

Something you might want to look at

WebDragon on 2005-03-23T19:58:40

While working on this redesign, you might want to keep a few things in mind, as poited out by the article below.

http://hixie.ch/advocacy/xhtml

to sum it up,

IE6 does not support application/xhtml+xml (in fact, it does not support XHTML at all)

Documents sent as text/html are handled as tag soup by most UAs.

This is the key. If you send XHTML as text/html, as far as browsers are concerned, you are just sending them Tag Soup. It doesn't matter if it validates, they are just going to be treating it the same was as plain old HTML 3.2 or random HTML garbage.

lots more detail in there, for the HTML/CSS/XHTML-savvy and strongly recommend you consider carefully the ramifications of offering XHTML as text/html particularly where IE6 is concerned (since it will be rendered as tag-soup, not XHTML)

Re:Something you might want to look at

WebDragon on 2005-03-23T20:02:51

'poited' ? heh I must have been in Pinky & The Brain mode.

Anyway, I wanted to add that some lively discussion of these issues can be had in the #web channel on Freenode (great bunch of folks by the way. one of my favorite freenode channels.) in addition to more FAQ info linked therein by its helpful denizens.

Re:Something you might want to look at

pudge on 2005-03-24T20:58:42

You're not even in the channel!

Re:Something you might want to look at

pudge on 2005-03-24T20:51:04

Yeah, I've been wondering if we should bother with XHTML, and this gives me more reason to wonder.

At this stage, there's no real difference between HTML and XHTML, as long as I we're being XHTML-compliant, except in whether to add the slash to empty tags like <br />. But pretty soon we will need to make that decision.

Re:Something you might want to look at

legLess on 2005-03-31T03:10:48

IMHO, Hixie's comments are valuable and interesting, but concerned more with correctness than practicality. Porting a major CMS from tag-soup to HTML in 2005 is a half-measure. XHTML requires little extra effort and is more forward-compatible.

If you read his page, you'll notice that nearly all of his points against XHTML are of the "unless you're careful, this will bite you" variety. Solution: use XHTML, and be careful. Just internalizing what he writes will give you a significant leg up on the problem.

Re:Something you might want to look at

pudge on 2005-03-31T03:45:45

The thing is, if we are not going to have perfect XHTML, then there is no point to using XHTML.

So that is the issue I am going over right now with my peeps. WIll it be perfect, always? If not, why bother using XHTML at all?

Working example; might be helpful

legLess on 2005-03-31T02:56:31

News4Neighbors

The site's been running for over a year. A few interesting things we've done are:

  • full XHTML templates; CSS for all style and positioning
  • photo upload plugin for story submissions
  • a Perl module which sets up enough of Slash code for automated testing
  • a custom plugin to manage organizations, to allow them to edit and publish their own data

All of it's under version control, but not yet publicly available.

I did all the templating/styling myself, and I'll be the first to admit that it's not perfect. The easy part, as you know, is creating a static page that looks or works like Slashdot (e.g. the ALA article). Diving into Slash code and retemplating it all is a bear; tracing a path through the Perl modules to the template and back again... But it works and the site's been reasonably successful locally.

I'm glad you guys are taking this project on. Let me know if there's anything I can do to help.