[Catalyst] Please help to figure out with URL's
m at rkellis.com
Thu Dec 4 21:07:10 GMT 2014
On 4 December 2014 at 20:31, Larry Leszczynski <larryl at emailplus.org> wrote:
> On Thu, Dec 4, 2014, at 12:41 PM, Trevor Leffler wrote:
> > This is a typical use:
> > <link href="[% c.uri_for('/static/css/my_style.css') | html %]"
> Assuming you're using Template Toolkit, you should use the "url" filter,
> not the "html" filter:
> <link href="[% c.uri_for('/static/css/my_style.css') | url %]"
afaik a url should be uri encoded when it's a url, and everything should be
html encoded when in html. the point being uri_for already uri_encodes the
url, and you should then html encode it when embedding it on the page, as
'&' is valid in a url, but not vaild in html
so <link href="[% c.uri_for('/static/css/my_style.css') | html %]"
rel="stylesheet"> would be the correct method
> List: Catalyst at lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive:
> Dev site: http://dev.catalyst.perl.org/
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Catalyst