在Plone或Zope里面,我可以在哪里找到对用户的文本输入进行整理的代码?在Plone中整理用户输入的代码
这种逻辑可以删除HTML,Javascript和所有类型的恶意或不需要的文本。
我想要做的事,如:
from plone.someplace.toolbox import sanityseUserInput
def mySanitizer(text):
text = sanityseUserInput(text)
# Do my work here
return text
你的意思是适用于richtext字段的清理? – 2013-02-08 22:41:32
是的。以及适用于描述字段和其他字符串字段(标题等)的清理。 – roq 2013-02-10 14:05:14