Development

#4624 (sfWebController::genUrl() doesn't like URNs without a double slash -- mailto:, etc.)

You must first sign up to be able to contribute.

Ticket #4624 (reopened defect)

Opened 9 months ago

Last modified 2 months ago

sfWebController::genUrl() doesn't like URNs without a double slash -- mailto:, etc.

Reported by: jwilliams Assigned to: fabien
Priority: minor Milestone:
Component: controller Version: 1.1.4
Keywords: uri urn link_to url_for controller webcontroller mailto Cc:
Qualification: Unreviewed

Description

Noticed this in link_to -- we can't pass a mailto:, magnet: etc link. The regular expression should be changed from #^[a-z][a-z0-9\+.\-]*\://#i to #^[a-z][a-z0-9\+.\-]*\:(//)?#i

http://en.wikipedia.org/wiki/URI_scheme

Attachments

symfony.patch (0.6 kB) - added by jwilliams on 06/01/09 22:27:30.
a trivial patch for this issue

Change History

11/27/08 10:32:18 changed by fabien

  • status changed from new to closed.
  • resolution set to invalid.

Why would you like to call genURL() with such URLs. The link_to() helper only accepts internal URIs.

05/12/09 21:42:42 changed by jwilliams

  • status changed from closed to reopened.
  • resolution deleted.

FWIW genUrl() is called directly by sfFeed2Plugin. I am making an RSS feed of magnet links. Isn't it better to change the regexp to be more permissive instead of have to code exceptions into anything that hopes to use sfWebController?

06/01/09 22:27:30 changed by jwilliams

  • attachment symfony.patch added.

a trivial patch for this issue

The Sensio Labs Network

Since 1998, Sensio Labs has been promoting the Open-Source software movement by providing quality web application development, training, consulting, and supporting several large Open-Source projects.