Example #1
0
 def rendered(self, content):
     extensions = ['auto_linker']
     if USE_NOFOLLOW_ON_USER_LINKS:
         extensions.append('nofollow')
     extension_configs = { 'spoiler_quote' : { 'extensions' : extensions[:] } }
     extensions.append('spoiler_quote')
     extensions.append('nl2br')
     return auto_user_link(self, self._as_markdown(content, *extensions, **extension_configs))
Example #2
0
    def activate_revision(self, user, revision, extensions=['urlize']):
        self.title = revision.title
        self.tagnames = revision.tagnames
        self.body = auto_user_link(self, self._as_markdown(revision.body, *extensions))

        self.active_revision = revision
        self.update_last_activity(user)

        self.save()
Example #3
0
    def activate_revision(self, user, revision, extensions=['urlize']):
        self.title = revision.title
        self.tagnames = revision.tagnames
        self.body = auto_user_link(
            self, self._as_markdown(revision.body, *extensions))

        self.active_revision = revision
        self.update_last_activity(user)

        self.save()
Example #4
0
    def activate_revision(self, user, revision, extensions=["urlize"]):
        self.title = revision.title
        self.tagnames = revision.tagnames

        from forum.utils.userlinking import auto_user_link

        self.body = auto_user_link(self, self._as_markdown(revision.body, *extensions))

        self.active_revision = revision
        self.update_last_activity(user)

        self.save()
Example #5
0
 def rendered(self, content):
     return auto_user_link(self, self._as_markdown(content,
                                                   *['auto_linker']))
Example #6
0
 def rendered(self, content):
     return auto_user_link(self, mark_safe(content))
Example #7
0
 def rendered(self, content):
     return auto_user_link(self, self._as_markdown(content, *['auto_linker']))
Example #8
0
File: node.py Project: cdman/OSQA
 def rendered(self, content):
     extensions = ["auto_linker", "nofollow"] if USE_NOFOLLOW_ON_USER_LINKS else ["auto_linker"]
     return auto_user_link(self, self._as_markdown(content, *extensions))