Wrong title from posts

On SOB, individual posts get the names of the categories used as the title by co.mments. I think this stems from apotheon’s formatting of the categories within a div of class-name “post-title”. Is co.mments using a regex to scrape the title that’s maybe a little too loose? Something like <.*title.*>? Example post: http://sob.apotheon.org/?p=182, where the title comes out as “Metalog& Geek 16 Jan 2007 07:53 pm”.

8 Responses to “Wrong title from posts”

  1. Assaf

    It does happens due to the formatting. For this blog, co.mments’s best guess is that the element with the class name ‘post-title’ contains the post’s title.

    Unfortunately, it happens to be the next element, with the class name post-info, that contains the title.

  2. SterlingCamden

    But the page also has a <title> element — why wouldn’t you use that?

  3. Assaf

    I’m actually considering that, to always pick the page title and ignore the post title. It will work better for some blogs, worse for others, but overall it might be the better tradeoff.

  4. SterlingCamden

    Oh, now I see your dilemma. Some blogs don’t even put the post title in the page title. Their bad, says I.

  5. Sherri

    I wonder if we were able to edit our titles ourselves at the time we added it to Co.mments might be easier than you having to adjust the programming for all the different blog softwares out there.

    Plus it would be nice because sometimes people title things differently than what we might, and it’s hard to remember what a post was about after some time has passed.

  6. Assaf

    Letting people edit their own title sounds very useful.

  7. SterlingCamden

    I’d vote for it.

  8. albany

    Meee tooo

Leave your response

Where's my comment? I get too much comment spam, so I have to moderate comments. If you don't see your comment immediately, be patient. I'll approve it the minute I see it. Want to know when your comment shows up, or check if anyone responded? Track it.

Or using OpenID