我有一个看起来像这样的模型:
class Foo(ndb.Model):
bar = ndb.TextProperty(required=True)
# other properties
我正在使用 jinja2 进行模板化:
{{ bar|safe }}
我“放入”这个:
<p>I think it is always going to be challenging planning a wedding in a foreign country. 1234 Weddings was able to pre-arrange everything before our arrival and even meet us at the airport to attend to last minute details.<br> The wedding itself was even more amazing than we could have imagined and flawless. For our day, 1234 Weddings became a part of our family and our memories. We are so greatful for the professional communication and creativity that made our day so special.</p>
ndb 破坏文本,输出:
<p>I think it is always going to be challenging planning a wedding in a for=
eign country. 1234 weddings was able to pre-arrange everything before our a=
rrival and even meet us at the airport to attend to last minute details.<br=
>The wedding itself was even more amazing than we could have imagined and f=
lawless. For our day, 1234 Weddings became a part of our family and our mem=
ories. We are so greatful for the professional communication and creativity=
that made our day so special.</p>
这只发生在我部署的站点上。localhost 上的相同代码不会产生此问题。
可能相关:
- 我的本地应用程序引擎没有持久数据存储。
- bar 最初是“StringProperty”类型。在将类型更改为“TextProperty”后,我注意到了这个问题,但在更改之前没有进行广泛的测试,因此问题可能在此之前就存在。
任何帮助,将不胜感激。
TIA。