On 4 December 2014 at 20:31, Larry Leszczynski <lar...@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 %]"
> rel="stylesheet">
>
> 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 %]"
>    rel="stylesheet">
>

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


> Larry
>
> _______________________________________________
> List: Catalyst@lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive:
> http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/
>
_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/

Reply via email to