Ticket #13150: widget.diff

File widget.diff, 1.1 KB (added by lsbardel, 15 years ago)
  • django/forms/widgets.py

     
    5252        return mark_safe(u'\n'.join(chain(*[getattr(self, 'render_' + name)() for name in MEDIA_TYPES])))
    5353
    5454    def render_js(self):
    55         return [u'<script type="text/javascript" src="%s"></script>' % self.absolute_path(path) for path in self._js]
     55        return [mark_safe('<script type="text/javascript" src="%s"></script>' % self.absolute_path(path)) for path in self._js]
    5656
    5757    def render_css(self):
    5858        # To keep rendering order consistent, we can't just iterate over items().
     
    6060        media = self._css.keys()
    6161        media.sort()
    6262        return chain(*[
    63             [u'<link href="%s" type="text/css" media="%s" rel="stylesheet" />' % (self.absolute_path(path), medium)
     63            [mark_safe(u'<link href="%s" type="text/css" media="%s" rel="stylesheet" />' % (self.absolute_path(path), medium))
    6464                    for path in self._css[medium]]
    6565                for medium in media])
    6666
Back to Top