I am trying to reproduce the basic example of the rebase function from the documentation for the bottle, but when my template renders, the html code is encoded and my tags are replaced with the 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>
Final html rendering:
<html>
<head>
<title>Page Title</title>
</head>
<body>
<p>Page Content ...</p>
</body>
</html>
As you can see, my template is included in the right place, but he likes it if the template engine escaped it for security reasons, and I don't know why.
I am surprised that I have only one problem.
I use bottle v0.12.5 and reproduced the problem on different environments (MacOSX and Ubuntu)
Any thoughts or ideas? Thanks
source
share