Ticket #13150: widget.diff
File widget.diff, 1.1 KB (added by , 15 years ago) |
---|
-
django/forms/widgets.py
52 52 return mark_safe(u'\n'.join(chain(*[getattr(self, 'render_' + name)() for name in MEDIA_TYPES]))) 53 53 54 54 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] 56 56 57 57 def render_css(self): 58 58 # To keep rendering order consistent, we can't just iterate over items(). … … 60 60 media = self._css.keys() 61 61 media.sort() 62 62 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)) 64 64 for path in self._css[medium]] 65 65 for medium in media]) 66 66