Opened 16 years ago

Closed 13 years ago

#21 closed defect (fixed)

Website metadata allows invalid characters which break the RDF feed

Reported by: IVORW@… Owned by: Dominic Hargreaves
Priority: normal Milestone:
Component: openguides Version: 0.50
Severity: normal Keywords: hackfestsummer2007-reviewed
Cc: ganesh@…

Description

Mon Oct 17 03:00:04 2005 IVORW - Ticket created [Reply] [Comment]

Subject: Website metadata allows invalid characters which break the RDF feed

Currently, no syntax validation is performed on the field "website". This actually allows square bracket syntax, such as the page:

http://london.openguides.org/index.cgi?Peckham_Rye_Common_And_Park

Unfortunately, this cleverness breaks anything parsing the RDF data (attached).

Either this metadata field should be validated more strictly in the commit function (probably a good idea), or we should at least cater for square bracket links in the RDF feed.

Download (untitled) 458b

Download Peckham_Rye_Common_And_Park.rdf 1.7k

Attachments (2)

Peckham_Rye_Common_And_Park.rdf (5.4 KB) - added by IVORW@… 16 years ago.
Peckham_Rye_Common_And_Park.2.rdf (1.7 KB) - added by IVORW@… 16 years ago.
This one isn't broken.

Download all attachments as: .zip

Change History (13)

Changed 16 years ago by IVORW@…

Changed 16 years ago by IVORW@…

This one isn't broken.

comment:1 Changed 16 years ago by Earle Martin

Owner: set to Earle Martin
Status: newassigned

comment:2 Changed 16 years ago by Dominic Hargreaves

Component: openguides

comment:3 Changed 16 years ago by ganesh

Cc: ganesh@… added

comment:4 Changed 14 years ago by Dominic Hargreaves

Owner: changed from Earle Martin to Nobody
Status: assignednew

comment:5 Changed 14 years ago by Kake

Keywords: hackfestsummer2007-reviewed added
Owner: changed from Nobody to Kake

Decision: We need to figure out whether this allowing of square brackets in the website field should be supported or not. There are arguments on both sides: on the one hand, it's a handy way to let people supply text for the link, to avoid having huge long URLs spreading across the screen; but on the other, it means that every time we want to spit out the website datum (e.g. in RDF) we have to parse the field. There's also the issue that if people have used this feature a lot then they might be annoyed if we remove it.

Decided that Kake will post to the list summarising the problem and asking for opinions on whether we should support this "feature" or not.

comment:6 Changed 14 years ago by Kake

Status: newassigned

comment:7 Changed 14 years ago by Kake

Consensus on the list is that we should remove this "feature" and use link text based on a truncated URL, like so:

* Website: http://this-url-is-really-long.com/and-it...                       
or                                                                            
* Website: http://quiteshortsite.com/

The number of characters retained in the URL should be admin-configurable, and default to 20.

comment:8 Changed 14 years ago by Dominic Hargreaves

The offending code starts here.

comment:9 Changed 13 years ago by Dominic Hargreaves

Owner: changed from Kake to Dominic Hargreaves
Status: assignednew

comment:10 Changed 13 years ago by Dominic Hargreaves

Status: newassigned

comment:11 Changed 13 years ago by Dominic Hargreaves

Resolution: fixed
Status: assignedclosed

(In [1231]) Correctly validate web site URLs during edit and display,

and truncate URLs that are too long (fixes #21)

Note: See TracTickets for help on using tickets.