Weblog entry #112 for Steve

Straw-poll on comment handling?
Posted by Steve on Fri 7 Jul 2006 at 13:31
Tags: none.

I've just received a mail from another person highlighting some of the broken comment handling facilities here.

Specifically the seperation between "plain text" vs. "html" when posting comments is a frequent problem, and it can be difficult to use special characters properly.

Mostly this wouldn't be an issue, except that we do have a lot of comments which wish to include things like Apache configuration blocks, eg:

<VirtualHost ...>
  Blah .. Blah
  Blah .. Blah 
  Megan ..
</VirtualHost>

The code behind the site (available here) makes a lot of modifications to submitted content to avoid XSS attacks, etc, and this has a lot of side-effects in the code which handles comments.

So I'm in a quandry.

The solution I'm strongly favouring is to drop Text vs. Plain in all areas of the site. Instead to switch to using BBCode for markup.

This will result in text like this:

[url=http://blah.com/]Link title[/url]

[b]Bold text[/b] [i]italic text[/i] .. normal text.

We lose the ability to do some things in the comments/markup, such as tables, but itemized lists (etc) will still be available.

Anybody comments? Opinions?

Yay/Nay?

 

Comments on this Entry

Posted by Anonymous (213.164.xx.xx) on Fri 7 Jul 2006 at 14:53
It looks like you're already changing it :) I can see a Comment Preview. I'd miss plain text mode if it were to go. It's useful to ensure that nothing fancy will happen to anything I type or paste.

[ Parent | Reply to this comment ]

Posted by Steve (62.30.xx.xx) on Fri 7 Jul 2006 at 14:56
[ Send Message | View Steve's Scratchpad | View Weblogs ]

Nothing has changed yet, the comment preview has been there for ages..

Even with bbcode support unmarked-up/plain text would still be there - just wouldn't be a seperate option.

Steve

[ Parent | Reply to this comment ]

Posted by Anonymous (213.164.xx.xx) on Fri 7 Jul 2006 at 15:17
Ah good. Nice that plain text won't be going away.

For the preview - If I make a comment in one place, then go to make a comment in another place, I see a message about having to wait 60 seconds, as well as an empty preview of the comment I am yet to write..

[ Parent | Reply to this comment ]

Posted by mindmerge (216.185.xx.xx) on Fri 7 Jul 2006 at 19:26
[ Send Message | View Weblogs ]
BBcode works fine... and only a few html elements are lost. Blockquote and code are still allowed so most of the functionality should remain. I would say it totally depends on what you wish to support. This is an awesome site and I appreciate the information that has been shared on it thus far. Thanks to all who have contributed time and knowledge.

[ Parent | Reply to this comment ]

Posted by Steve (62.30.xx.xx) on Sat 8 Jul 2006 at 11:55
[ Send Message | View Steve's Scratchpad | View Weblogs ]

The main things I want to support are:

  • Italic
  • Bold
  • Pre-formatted text.
  • Hyperlinks

Anything else is a bonus I think.

I'm going to see if I can fixup the comment handling a little just now, and if I can't then I'll be very keen to switch to something simpler which I don't have to write ;)

Steve

[ Parent | Reply to this comment ]

Posted by dkg (216.254.xx.xx) on Sat 8 Jul 2006 at 01:01
[ Send Message | View dkg's Scratchpad | View Weblogs ]
aw, no... i'm really hoping that you don't take away the html processing option. you've done a good job from what i've seen so far in filtering out XSS attacks, and having good ol' html at my disposal is really handy. there are only so many markup languages a guy can keep in his head at once!

i trust you to make the decision in the way that's best for d-a.org, but count me as one vote for keeping around an html submission choice (even if i have to go turn it on in my Options setting or something).

[ Parent | Reply to this comment ]

Posted by Steve (62.30.xx.xx) on Sat 8 Jul 2006 at 14:10
[ Send Message | View Steve's Scratchpad | View Weblogs ]

After a couple of hours work I think I've got things fixed up better now - so it looks like there will be no changes in the short term.

Maybe a subject to revisit in the future if it becomes necessary for other reasons.

I think that using "Plain Text" should now work for all the cases that people have reported as being broken in the past.

Steve

[ Parent | Reply to this comment ]

User Login

Username:

Password:

[ Advanced Login ]

Register Account

Quick Site Search