Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
filters escaping html code by default
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
mk  
View profile  
 More options Jan 9, 7:41 am
From: mk <mrk...@gmail.com>
Date: Fri, 9 Jan 2009 04:41:14 -0800 (PST)
Local: Fri, Jan 9 2009 7:41 am
Subject: filters escaping html code by default
Hello everyone,

I'm new Pylons user and I use Mako templates. By default it seems that
Mako is escaping HTML characters like follows in Pylons helper (${h}
variable in template):

template:

${h.link_to('FrontPage', h.url_for(action="index",
title="FrontPage"))}

Rendered HTML source:

&lt;a href=&quot;/?title=FrontPage&quot;&gt;FrontPage&lt;/a&gt;

Now I *can* turn that off with:

${h.link_to('FrontPage', h.url_for(action="index", title="FrontPage"))|
n}

But is it possible to make it default? Is this my misconfiguration of
Mako or a bug somewhere?

I have Pylons 0.9.7 installed (via easy_install, with all the
dependencies), Mako appears to be 0.2.4 (mako-0.2.4-py2.5.egg), Python
2.5.2 and it seems

Regards,
mk


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael Bayer  
View profile  
 More options Jan 9, 12:12 pm
From: Michael Bayer <mike...@zzzcomputing.com>
Date: Fri, 9 Jan 2009 12:12:39 -0500
Local: Fri, Jan 9 2009 12:12 pm
Subject: Re: [Mako] filters escaping html code by default

On Jan 9, 2009, at 7:41 AM, mk wrote:

change the default filters in your environment.py file, where Pylons  
configures the TemplateLookup (big win using Pylons 0.9.7 here...).  
check the mako docs on fitering for some of the available options.

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google