[Zope3-Users] Disable raw directive in restructured text

Florian Lindner mailinglists at xgm.de
Thu Mar 15 15:46:27 EDT 2007


Hello,
I'm using this code to render a rest snippet to HTML:

    def convertToHTML(self, comment):
        """ Converts a comment from restructured text to HTML. """
        text = unicode(comment.content)
        renderer = ReStructuredTextToHTMLRenderer(text, self.request)
        return renderer.render().strip()

Since the text in entered by users I want to disable the raw directive [1]. 
How can I do this? (only while rendering this text, not globally)

Thanks,

Florian

[1] http://docutils.sourceforge.net/docs/ref/rst/directives.html#raw


More information about the Zope3-users mailing list