=== modified file 'django/contrib/admin/templates/admin/change_form.html'
|
|
|
3 | 3 | |
4 | 4 | {% block extrahead %}{{ block.super }} |
5 | 5 | <script type="text/javascript" src="../../../jsi18n/"></script> |
6 | | {{ media }} |
| 6 | {{ media|safe }} |
7 | 7 | {% endblock %} |
8 | 8 | |
9 | 9 | {% block stylesheet %}{% admin_media_prefix %}css/forms.css{% endblock %} |
=== modified file 'django/contrib/admin/templates/admin/change_list_results.html'
|
|
|
2 | 2 | <table cellspacing="0"> |
3 | 3 | <thead> |
4 | 4 | <tr> |
5 | | {% for header in result_headers %}<th{{ header.class_attrib }}> |
| 5 | {% for header in result_headers %}<th{{ header.class_attrib|safe }}> |
6 | 6 | {% if header.sortable %}<a href="{{ header.url }}">{% endif %} |
7 | 7 | {{ header.text|capfirst }} |
8 | 8 | {% if header.sortable %}</a>{% endif %}</th>{% endfor %} |
=== modified file 'django/contrib/admin/templates/admin/includes/fieldset.html'
|
|
|
3 | 3 | {% if fieldset.description %}<div class="description">{{ fieldset.description }}</div>{% endif %} |
4 | 4 | {% for line in fieldset %} |
5 | 5 | <div class="form-row{% if line.errors %} errors{% endif %} {% for field in line %}{{ field.field.name }} {% endfor %} "> |
6 | | {{ line.errors }} |
| 6 | {{ line.errors|safe }} |
7 | 7 | {% for field in line %} |
8 | 8 | {% if field.is_checkbox %} |
9 | 9 | {{ field.field }}{{ field.label_tag }} |
=== modified file 'django/contrib/admin/views/main.py'
|
|
|
9 | 9 | from django.db.models.query import handle_legacy_orderlist, QuerySet |
10 | 10 | from django.http import Http404 |
11 | 11 | from django.utils.encoding import force_unicode, smart_str |
| 12 | from django.utils.safestring import mark_safe |
12 | 13 | from django.utils.translation import ugettext |
13 | 14 | import operator |
14 | 15 | |
=== modified file 'django/contrib/admin/widgets.py'
|
|
|
5 | 5 | from django import newforms as forms |
6 | 6 | from django.utils.datastructures import MultiValueDict |
7 | 7 | from django.utils.text import capfirst |
| 8 | from django.utils.safestring import mark_safe |
8 | 9 | from django.utils.translation import ugettext as _ |
9 | 10 | from django.conf import settings |
10 | 11 | |
… |
… |
|
28 | 29 | # API to determine the ID dynamically. |
29 | 30 | output.append(u'SelectFilter.init("id_%s", "%s", %s, "%s"); });</script>\n' % \ |
30 | 31 | (name, self.verbose_name.replace('"', '\\"'), int(self.is_stacked), settings.ADMIN_MEDIA_PREFIX)) |
31 | | return u''.join(output) |
| 32 | return mark_safe(u''.join(output)) |
32 | 33 | |
33 | 34 | class AdminDateWidget(forms.TextInput): |
34 | 35 | class Media: |
… |
… |
|
73 | 74 | if value: |
74 | 75 | output.append('Currently: <a target="_blank" href="%s%s">%s</a> <br>Change: ' % (settings.MEDIA_URL, value, value)) |
75 | 76 | output.append(super(AdminFileWidget, self).render(name, value, attrs)) |
76 | | return u''.join(output) |
| 77 | return mark_safe(u''.join(output)) |
77 | 78 | |
78 | 79 | class ForeignKeyRawIdWidget(forms.TextInput): |
79 | 80 | """ |
… |
… |
|
99 | 100 | output.append('<a href="%s%s" class="related-lookup" id="lookup_id_%s" onclick="return showRelatedObjectLookupPopup(this);"> ' % \ |
100 | 101 | (related_url, url, name)) |
101 | 102 | output.append('<img src="%simg/admin/selector-search.gif" width="16" height="16" alt="Lookup"></a>' % settings.ADMIN_MEDIA_PREFIX) |
102 | | return u''.join(output) |
| 103 | return mark_safe(u''.join(output)) |
103 | 104 | #if self.change: # TODO |
104 | 105 | #output.append(' <strong>TODO</strong>') |
105 | 106 | |
… |
… |
|
148 | 149 | output.append(u'<a href="%sadd/" class="add-another" id="add_id_%s" onclick="return showAddAnotherPopup(this);"> ' % \ |
149 | 150 | (related_url, name)) |
150 | 151 | output.append(u'<img src="%simg/admin/icon_addlink.gif" width="10" height="10" alt="Add Another"/></a>' % settings.ADMIN_MEDIA_PREFIX) |
151 | | return u''.join(output) |
| 152 | return mark_safe(u''.join(output)) |
152 | 153 | |
153 | 154 | def __deepcopy__(self, memo): |
154 | 155 | # There's no reason to deepcopy admin_site, etc, so just return self. |
=== modified file 'django/newforms/widgets.py'
|
|
|
528 | 528 | if id_: |
529 | 529 | final_attrs = dict(final_attrs, id='%s_%s' % (id_, i)) |
530 | 530 | output.append(widget.render(name + '_%s' % i, widget_value, final_attrs)) |
531 | | return self.format_output(output) |
| 531 | return mark_safe(self.format_output(output)) |
532 | 532 | |
533 | 533 | def id_for_label(self, id_): |
534 | 534 | # See the comment for RadioSelect.id_for_label() |