Prepare accented characters for HTML

Tony van der Hoff lists at vanderhoff.org
Thu Mar 28 12:45:53 EDT 2019


On 28/03/2019 15:09, Peter Otten wrote:
> Tony van der Hoff wrote:
> 
>> On 28/03/2019 12:46, Jon Ribbens wrote:
>>> On 2019-03-28, Tony van der Hoff <lists at vanderhoff.org> wrote:
>>>> Thanks, Chris. The problem is not with the browser, but Jinja crashes.
>>>> Probably a bug, but I'm too wedded to that engine to change now. I'll
>>>> raise it on the Jinja bug site.
>>>
>>> It'll almost certainly be a mistake in the way you're using Jinja.
>>> I can't believe nobody's used non-ASCII characters in Jinja before.
>>>
>>
>> I'm open to suggestions.
> 
> You have to describe the "crash". If you can provide a small script to 
> reproduce it that would be best. For demonstration purposes feed the 
> renderer a constant string instead of reading from the db.
> 
> You should also tell us which version of Python and Jinja you are using.
> 
> 
OK,The crash is evidenced by an empty web page being generated,
containing just <html><head></head><body></body></html>
elements, with no content. No error messages nor exceptions.

I.m using python3.5.3 and jinja 2.10.

I have placed a sample script with a jnj template at
https://drive.google.com/drive/folders/1rM5F46wRqHYn0VBXUhSl8DkNcwsp2u8b?usp=sharing

The template contains a commented-out line, which when uncommented shows
the alleged bug.

Good luck!
-- 
Tony van der Hoff        | mailto:tony at vanderhoff.org
Buckinghamshire, England |



More information about the Python-list mailing list