Esempio n. 1
0
 def spellcheck(self, REQUEST):
     from Products.kupu.python.spellcheck import SpellChecker, format_result
     data = REQUEST["text"]
     c = SpellChecker()
     result = c.check(data)
     if result == None:
         result = ""
     else:
         result = format_result(result)
     REQUEST.RESPONSE.setHeader("Content-Type","text/xml, charset=utf-8")
     REQUEST.RESPONSE.setHeader("Content-Length",str(len(result)))
     return result
Esempio n. 2
0
    def spellcheck(self, REQUEST, RESPONSE):
        """Spellchecker button support fucntion"""
        data = REQUEST.form.get('text')
        c = SpellChecker()
        result = c.check(data)
        if result == None:
            result = ''
        else:
            result = format_result(result)

        RESPONSE.setHeader('Content-Type', 'text/xml,charset=UTF-8')
        RESPONSE.setHeader('Content-Length', len(result))
        RESPONSE.write(result)
Esempio n. 3
0
 def spellcheck(self, REQUEST):
     """Call spellchecker: WARNING this functionality may not work,
     it is not part of the standard Plone+kupu implementation.
     Some user assembly required."""
     from Products.kupu.python.spellcheck import SpellChecker, format_result
     data = REQUEST["text"]
     c = SpellChecker()
     result = c.check(data)
     if result == None:
         result = ""
     else:
         result = format_result(result)
     REQUEST.RESPONSE.setHeader("Content-Type","text/xml, charset=utf-8")
     REQUEST.RESPONSE.setHeader("Content-Length",str(len(result)))
     return result
Esempio n. 4
0
 def spellcheck(self, REQUEST):
     """Call spellchecker: WARNING this functionality may not work,
     it is not part of the standard Plone+kupu implementation.
     Some user assembly required."""
     from Products.kupu.python.spellcheck import SpellChecker, format_result
     data = REQUEST["text"]
     c = SpellChecker()
     result = c.check(data)
     if result == None:
         result = ""
     else:
         result = format_result(result)
     REQUEST.RESPONSE.setHeader("Content-Type", "text/xml, charset=utf-8")
     REQUEST.RESPONSE.setHeader("Content-Length", str(len(result)))
     return result