Mako escaping javascript/stylesheet WebHelpers

19 views
Skip to first unread message

Devin Torres

unread,
Apr 25, 2008, 4:22:35 PM4/25/08
to pylons-...@googlegroups.com
This used to work.
${ h.stylesheet_link_tag('blueprint/src/reset.css',
'blueprint/src/typography.css',
'blueprint/src/grid.css',
'blueprint/src/forms.css',
'blueprint/plugins/css-classes/css-classes.css',
media="screen, projection",
minified=True, combined=True) }

But now all I get is this:

<link href="/stylesheets/blueprint/src/reset.css"
media="screen, projection" rel="Stylesheet"
type="text/css" />

<link href="/stylesheets/blueprint/src/typography.css"
media="screen, projection" rel="Stylesheet"
type="text/css" />
<link href="/stylesheets/blueprint/src/grid.css"
media="screen, projection" rel="Stylesheet"
type="text/css" />

<link href="/stylesheets/blueprint/src/forms.css"
media="screen, projection" rel="Stylesheet"
type="text/css" />
<link href="/stylesheets/blueprint/plugins/css-classes/css-classes.css"
media="screen, projection" rel="Stylesheet"
type="text/css" />

<link href="/stylesheets/blueprint/print.css"
media="print" rel="Stylesheet"
type="text/css" />
<!--[if IE]>&lt;link href=&quot;/blueprint/ie.css&quot;
media=&quot;screen, projection&quot; rel=&quot;Stylesheet&quot;
type=&quot;text/css&quot; /&gt;<![endif]-->

Has anybody seen this before?

Devin Torres

unread,
Apr 25, 2008, 4:29:14 PM4/25/08
to pylons-...@googlegroups.com
Nevermind. It seems there was a bug in Mako.

It never needed the filter syntax before, but changing it to this did the trick:

${ h.stylesheet_link_tag('blueprint/src/reset.css',
'blueprint/src/typography.css',
'blueprint/src/grid.css',
'blueprint/src/forms.css',
'blueprint/plugins/css-classes/css-classes.css',
media="screen, projection",

minified=True, combined=True) | n }

Jorge Vargas

unread,
Apr 25, 2008, 4:34:19 PM4/25/08
to pylons-...@googlegroups.com
On Fri, Apr 25, 2008 at 4:29 PM, Devin Torres <devin....@gmail.com> wrote:
>
> Nevermind. It seems there was a bug in Mako.
>
> It never needed the filter syntax before, but changing it to this did the trick:
>
>
> ${ h.stylesheet_link_tag('blueprint/src/reset.css',
> 'blueprint/src/typography.css',
> 'blueprint/src/grid.css',
> 'blueprint/src/forms.css',
> 'blueprint/plugins/css-classes/css-classes.css',
> media="screen, projection",
> minified=True, combined=True) | n }
>
in which version is this? I'm running the above and I'm not needing
what your saying.

Ben Bangert

unread,
Apr 25, 2008, 4:37:24 PM4/25/08
to pylons-...@googlegroups.com
On Apr 25, 2008, at 1:22 PM, Devin Torres wrote:

> This used to work.
> ${ h.stylesheet_link_tag('blueprint/src/reset.css',
> 'blueprint/src/typography.css',
> 'blueprint/src/grid.css',
> 'blueprint/src/forms.css',
> 'blueprint/plugins/css-classes/css-classes.css',
> media="screen, projection",
> minified=True, combined=True) }

If you're using the latest WebHelpers 0.6dev, that should work without
the unescaping filter. Can you be more specific about what versions
you're using?

Cheers,
Ben

Devin Torres

unread,
Apr 25, 2008, 4:58:52 PM4/25/08
to pylons-...@googlegroups.com
Everything is latest dev. Pylons, WebHelpers, and Mako.

Ben Bangert

unread,
Apr 25, 2008, 5:10:07 PM4/25/08
to pylons-...@googlegroups.com
On Apr 25, 2008, at 1:58 PM, Devin Torres wrote:

> Everything is latest dev. Pylons, WebHelpers, and Mako.

What does your import line look line in your helpers.py?

- Ben

Devin Torres

unread,
Apr 25, 2008, 5:16:11 PM4/25/08
to pylons-...@googlegroups.com
from webhelpers import *
from webhelpers.rails import *
Reply all
Reply to author
Forward
0 new messages