Re: Django escapes a string partially

2018-01-22 Thread Julio Biason
Hi, You should wrap your `data-content={{ v.error_msg }}` in quotes, like this: `data-content="{{ v.error_msg }}"`. Otherwise you'll generate the template as `data-content='NoneType' object has not attribute "rfind"`, which is a valid HTML (data-content will have the string 'NoneType' and the

Re: Django escapes a string partially

2018-01-22 Thread Daniel Roseman
On Monday, 22 January 2018 16:02:30 UTC, Ron Moran wrote: > > Hi there! > > I have a problem with escaping an error. > I have this unicode in python(2.7) which isn't escaped well in a span > element: > > u"'NoneType' object has no attribute 'rfind'" > The template is defined as follows: > >

Django escapes a string partially

2018-01-22 Thread Ron Moran
Hi there! I have a problem with escaping an error. I have this unicode in python(2.7) which isn't escaped well in a span element: u"'NoneType' object has no attribute 'rfind'" The template is defined as follows: {{ v.get_human_status }} where v.error_msg is the string above. It should be