widelands-dev team mailing list archive
-
widelands-dev team
-
Mailing list archive
-
Message #09476
Re: [Merge] lp:~widelands-dev/widelands-website/post_django1_8_cleanup into lp:widelands-website
Review: Approve
one typo, otherwise lgtm.
Diff comments:
>
> === modified file 'threadedcomments/templatetags/threadedcommentstags.py'
> --- threadedcomments/templatetags/threadedcommentstags.py 2016-12-13 18:28:51 +0000
> +++ threadedcomments/templatetags/threadedcommentstags.py 2017-01-23 13:01:48 +0000
> @@ -136,34 +136,12 @@
>
> def auto_transform_markup(comment):
> """Given a comment (``ThreadedComment`` or ``FreeThreadedComment``), this
> - tag looks up the markup type of the comment and formats the output
> - accordingly.
> -
> - It can also output the formatted content to a context variable, if a
> - context name is specified.
> + tag simply returns the commetn after wl_markdown runs over it.
typo: commetn
>
> """
> - # NOCOMM franku: django.contrib.markup doesn't exist anymore
> - try:
> - from django.utils.html import escape
> - from threadedcomments.models import MARKDOWN, TEXTILE, REST, PLAINTEXT
> - if comment.markup == MARKDOWN:
> - from django.contrib.markup.templatetags.markup import markdown
> - return markdown(comment.comment)
> - elif comment.markup == TEXTILE:
> - from django.contrib.markup.templatetags.markup import textile
> - return textile(comment.comment)
> - elif comment.markup == REST:
> - from django.contrib.markup.templatetags.markup import restructuredtext
> - return restructuredtext(comment.comment)
> -# elif comment.markup == HTML:
> -# return mark_safe(force_unicode(comment.comment))
> - elif comment.markup == PLAINTEXT:
> - return escape(comment.comment)
> - except ImportError:
> - # Not marking safe, in case tag fails and users input malicious code.
> - # NOCOMM franku: bleach the comment
> - return do_wl_markdown(comment.comment, 'bleachit')
> +
> + # Franku: bleach the comment
> + return do_wl_markdown(comment.comment, 'bleachit')
>
>
> def do_auto_transform_markup(parser, token):
--
https://code.launchpad.net/~widelands-dev/widelands-website/post_django1_8_cleanup/+merge/315301
Your team Widelands Developers is subscribed to branch lp:widelands-website.
References