Rebase template function in bottle python doesn't render the template as it should -


i'm trying reproduce basic example of rebase function bottle documentation, when template rendered html code encoded , tags replaced corresponding html code.

my template:

% rebase('base.tpl', title='page title') <p>page content ...</p> 

my base template:

<html> <head>   <title>{{title or 'no title'}}</title> </head> <body>   {{base}} </body> </html> 

the final html rendered:

<html> <head>   <title>page title</title> </head> <body>       &lt;p&gt;page content ...&lt;/p&gt;  </body> </html> 

as can see, template included @ right place, it's if template engine had escaped security reasons , don't know whys.

i'm surprised being 1 having issue.

i'm using bottle v0.12.5 , reproduced issue on different environnements (macosx & ubuntu)

any thoughts or ideas? thanks

html special characters automatically escaped. can unescape them adding ! @ beginning of expression:

<body>   {{!base}} </body> 

you can see documentation here.


Comments

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

javascript - Using Windows Media Player as video fallback for video tag -

c# - Unity IoC Lifetime per HttpRequest for UserStore -