prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  L'affichage des pseudos dans la liste des tutoriels / article déconne
  L'affichage du pseudo "Bat'" n'est pas correct.
  
  ![bug](https://cloud.githubusercontent.com/assets/6099338/8538835/07cccad8-2473-11e5-8849-c645a0c34875.png)
  
  Possible de voir le comportement sur la page: https://zestedesavoir.com/tutoriels/?tag=dot-net
  
  
  </issue>
  <code>
  [start of zds/utils/templatetags/captureas.py]
  1 # -*- coding: utf-8 -*-
  2 
  3 from django import template
  4 
  5 register = template.Library()
  6 
  7 """
  8 Define a tag allowing to capture template content as a variable.
  9 """
  10 
  11 
  12 @register.tag(name='captureas')
  13 def do_captureas(parser, token):
  14     """
  15     Define a tag allowing to capture template content as a variable.
  16 
  17     :param parser: The django template parser
  18     :param token: tag token (tag_name + variable_name)
  19     :return: Template node.
  20     """
  21 
  22     try:
  23         _, variable_name = token.split_contents()
  24     except ValueError:
  25         raise template.TemplateSyntaxError("'captureas' node requires a variable name.")
  26 
  27     nodelist = parser.parse(('endcaptureas',))
  28     parser.delete_first_token()
  29 
  30     return CaptureasNode(nodelist, variable_name)
  31 
  32 
  33 class CaptureasNode(template.Node):
  34     """
  35     Capture end render node content to a variable name.
  36     """
  37 
  38     def __init__(self, nodelist, variable_name):
  39         """
  40         Create a template node which render `nodelist` to `variable_name`.
  41 
  42         :param nodelist: The node list to capture.
  43         :param variable_name: The variable name which will gain the rendered content.
  44         """
  45         self.__node_list = nodelist
  46         self.__variable_name = variable_name
  47 
  48     def render(self, context):
  49         """
  50         Render the node list to the variable name.
  51 
  52         :param context: Current context.
  53         :return: Empty string
  54         :rtype: str
  55         """
  56         output = self.__node_list.render(context)
  57         context[self.__variable_name] = output.strip()
  58         return ''
  59
  [end of zds/utils/templatetags/captureas.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/zds/utils/templatetags/captureas.py b/zds/utils/templatetags/captureas.py
  --- a/zds/utils/templatetags/captureas.py
  +++ b/zds/utils/templatetags/captureas.py
  @@ -1,6 +1,7 @@
   # -*- coding: utf-8 -*-
   
   from django import template
  +from django.utils.safestring import mark_safe
   
   register = template.Library()
   
  @@ -54,5 +55,5 @@
           :rtype: str
           """
           output = self.__node_list.render(context)
  -        context[self.__variable_name] = output.strip()
  +        context[self.__variable_name] = mark_safe(output.strip())
           return ''
  
verification_info: {"golden_diff": "diff --git a/zds/utils/templatetags/captureas.py b/zds/utils/templatetags/captureas.py\n--- a/zds/utils/templatetags/captureas.py\n+++ b/zds/utils/templatetags/captureas.py\n@@ -1,6 +1,7 @@\n # -*- coding: utf-8 -*-\n \n from django import template\n+from django.utils.safestring import mark_safe\n \n register = template.Library()\n \n@@ -54,5 +55,5 @@\n         :rtype: str\n         \"\"\"\n         output = self.__node_list.render(context)\n-        context[self.__variable_name] = output.strip()\n+        context[self.__variable_name] = mark_safe(output.strip())\n         return ''\n", "issue": "L'affichage des pseudos dans la liste des tutoriels / article d\u00e9conne\nL'affichage du pseudo \"Bat'\" n'est pas correct.\n\n![bug](https://cloud.githubusercontent.com/assets/6099338/8538835/07cccad8-2473-11e5-8849-c645a0c34875.png)\n\nPossible de voir le comportement sur la page: https://zestedesavoir.com/tutoriels/?tag=dot-net\n\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\n\nfrom django import template\n\nregister = template.Library()\n\n\"\"\"\nDefine a tag allowing to capture template content as a variable.\n\"\"\"\n\n\n@register.tag(name='captureas')\ndef do_captureas(parser, token):\n    \"\"\"\n    Define a tag allowing to capture template content as a variable.\n\n    :param parser: The django template parser\n    :param token: tag token (tag_name + variable_name)\n    :return: Template node.\n    \"\"\"\n\n    try:\n        _, variable_name = token.split_contents()\n    except ValueError:\n        raise template.TemplateSyntaxError(\"'captureas' node requires a variable name.\")\n\n    nodelist = parser.parse(('endcaptureas',))\n    parser.delete_first_token()\n\n    return CaptureasNode(nodelist, variable_name)\n\n\nclass CaptureasNode(template.Node):\n    \"\"\"\n    Capture end render node content to a variable name.\n    \"\"\"\n\n    def __init__(self, nodelist, variable_name):\n        \"\"\"\n        Create a template node which render `nodelist` to `variable_name`.\n\n        :param nodelist: The node list to capture.\n        :param variable_name: The variable name which will gain the rendered content.\n        \"\"\"\n        self.__node_list = nodelist\n        self.__variable_name = variable_name\n\n    def render(self, context):\n        \"\"\"\n        Render the node list to the variable name.\n\n        :param context: Current context.\n        :return: Empty string\n        :rtype: str\n        \"\"\"\n        output = self.__node_list.render(context)\n        context[self.__variable_name] = output.strip()\n        return ''\n", "path": "zds/utils/templatetags/captureas.py"}]}