While working on postMedia and putMedia of the Atom binding (TUSCANY-2567), I've come across a minor issue, and I wonder if it has been addressed elsewhere in Tuscany. My code base search found nothing.

The Atom Publishing Protocol specification [1] states that when someone posts media, the slug header is to be used as a link to the media. For instance, if someone posts a photo with:
   Slug: The Beach at Cannes
then an example link to the media returned would be:
<link rel="edit-media" href="http://media.example.org/edit/the_beach_at_cannes.jpg"; />

Notice how the slug has been "normalized?" The spaces have been removed and the caps have been made lower case. I imagine you would remove or UTF encode quotes and other potentially interfering characters in the link as well.

Are there other places in the Tuscany code base where user submitted filenames, URLs, titles, etc. are sanitized for internal consumption?

[1] Atom Publishing Protocol - http://tools.ietf.org/html/rfc5023#section-9.6
--
Thanks, Dan Becker

Reply via email to