mirror of
https://github.com/django/django.git
synced 2024-11-30 07:06:18 +01:00
Fixed #8041 -- Modified media rendering to return safe strings. Thanks to Daniel Pope <dan@mauveinternet.co.uk> for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8285 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
2e08591403
commit
4ecc5f490a
@ -50,7 +50,7 @@ class Media(StrAndUnicode):
|
||||
return self.render()
|
||||
|
||||
def render(self):
|
||||
return u'\n'.join(chain(*[getattr(self, 'render_' + name)() for name in MEDIA_TYPES]))
|
||||
return mark_safe(u'\n'.join(chain(*[getattr(self, 'render_' + name)() for name in MEDIA_TYPES])))
|
||||
|
||||
def render_js(self):
|
||||
return [u'<script type="text/javascript" src="%s"></script>' % self.absolute_path(path) for path in self._js]
|
||||
|
Loading…
Reference in New Issue
Block a user