Home Improvements
Phil Ringnalda posted a rant about sites that don’t tell you how their comments system works—like this one. I’ve been meaning to add instructions for ages but never got round to it; now I have. Hopefully this will mean less comments with no line breaks or links that don’t work.
Hey, bonus! I'd completely forgotten that you don't convert breaks. Which I guess was my point, wasn't it?
Thanks for the opportunity to only look as foolish as I should.
Phil Ringnalda - 13th April 2003 21:23 - #
Why don't you convert line breaks? Having to type paragraph tags for comments is annoying, especially in XHTML, which requires closing tags. I'm not saying to convert every line break (or pair of line breaks) to a paragraph tag -- if there are already paragraph tags or other tags with margins surrounding the line breaks, ignore the redundant line breaks.
What does "XHTML must be well formed" mean? If my XHTML isn't well-formed, what will happen -- will my comment be converted to valid XHTML in an unreliable way, will it be rejected, or will it cause anyone who views this page to get an XML well-formedness error?
What attributes are allowed? In particular, if the "style" attribute is allowed, what properties are allowed?
Have you considered adding a preview button? That's the best way to prevent me from making a formatting error in my post, at least.
This comment box is way too small.
Jesse Ruderman - 14th April 2003 01:08 - #
Auto conversion doesn't happen because it's pretty difficult to do from a coding point of view, and it's also difficult from a usability point of view (if I implement it so it only auto-converts in specific circumstances how is the user to know what those curcumstances are?).
If XHTML isn't well formed or invalid tags are used, a polite error message describes any problems (ensuring the old markup is still available).
Style attributes aren't allowed - the system purposefully limits people to structural HTML only (hence the list of allowed tags). You're right though, it does need to list allowed attributes (for the record it allows cite on blockquote, href and title on a, title on abbr and acronym and cite on q).
A preview button would solve most of these problems straight away, but adding one is actually harder than one would expect thanks to some underlying problems with the architecture of my blogging system. I plan to address these in the next major update of the code.
I've just made the comment box bigger ;)
Thanks for all the feedback.
Simon Willison - 14th April 2003 01:26 - #