Ticket #178 (accepted defect)

Opened 07/07/08 20:35:55 (3 months ago)

Last modified 07/22/08 01:42:32 (3 months ago)

Invalid URL in comment form not giving warning

Reported by: kimparsell Owned by: sidtheduck
Priority: low Milestone: 1.1
Component: General Version: 1.0b3
Severity: normal Keywords:
Cc:

Description

I added a comment to an image, filling in all fields, including the URL. I clicked submit and the comment went through - no problem. However, when I get the comment notification email, the URL is blank - it was not saved in the database (I checked via phpMyAdmin). In the admin panel, I'm able to approve the comment - no problem. I was able to edit the comment and add the URL, and then it was saved.

Cause: The URL had 2 dots in it after www (http://www'''..'''domain.tld), so the entire URL was rejected. There was no error message that there was a problem with the URL when I submitted the comment - should there have been?

Change History

Changed 07/08/08 20:03:47 (3 months ago) by sidtheduck

  • owner changed from mike to sidtheduck
  • status changed from new to assigned

You are correct. The current codebase does a quick check to see if the URL is formatted somewhat correctly, and if not, clears out the space. Since the website is "optional" it doesn't throw an error, but just cleans the field (instead of having the admin clean it manually if moderated comments is not turned on).

I think we could add some logic that if the field is not blank (i.e. someone put *something* in the field), then it returns an error if not formatted as a correct URL (based on the loose format regulations already in place which checks if there is at least one dot (.) with some text before, after, and between any subsequent dots).

What does everyone else think?

Changed 07/22/08 01:42:32 (3 months ago) by sidtheduck

  • milestone changed from 1.0 to 1.1
Note: See TracTickets for help on using tickets.