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))
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()
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()
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()
def rendered(self, content): return auto_user_link(self, self._as_markdown(content, *['auto_linker']))
def rendered(self, content): return auto_user_link(self, mark_safe(content))
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))