简体   繁体   English

适用于Google App Engine的文本到HTML转换器

[英]Text to HTML converter for Google App Engine

I need a script that converts plain text into HTML (eg like the one in reddit comments system). 我需要一个将纯文本转换为HTML的脚本(例如,类似于reddit评论系统中的脚本)。 There are plenty of those out there, yeah, but I need one that could work with Google App Engine (and Python). 是的,有很多这样的工具,但是我需要一个可以与Google App Engine(和Python)一起使用的工具。

It could be great if the script could work both ways: for encoding the text and decoding it back from HTML (for editing saved texts). 如果脚本可以同时使用以下两种方式,那就更好了:对文本进行编码并从HTML解码回去(用于编辑保存的文本)。

Thanks in advance! 提前致谢!

There's multiple 'humane' markup languages, and no particular reason for any of them to not work in App Engine. 有多种“人性化”的标记语言,没有任何特殊原因使其无法在App Engine中使用。 My blog engine, bloggart, for example, supports several via their standard Python libraries. 例如,我的博客引擎Bloggart通过其标准Python库支持多个博客。

Instead of attempting to convert HTML back to markup, you should be storing the original, un-mangled markup the user input, and allowing them to edit that, instead. 而不是尝试将HTML转换回标记,您应该存储用户输入的原始,未修饰的标记,并允许他们对其进行编辑。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM