我的模型看起来像这样:
class Foo(ndb.Model):
bar = ndb.TextProperty(required=True)
# other properties
我正在使用jinja2进行模板化:
{{ bar|safe }}
我'放'this:
<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修改文本,输出this:
<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上的相同代码不会产生此问题。
可能相关:
任何帮助将不胜感激 TIA。
答案 0 :(得分:1)
blobstore上传处理程序中存在一个错误导致同时提交文本的编码问题,这里的评论有一个过去对我有用的补丁:http://code.google.com/p/googleappengine/issues/detail?id=2749
答案 1 :(得分:0)
它不是NDB - 数据存储区也没有对你的文本做过这样的事情。它看起来像某种内容编码,特别是引用打印,可能是由浏览器应用的?