From 8ce7beaea05cff2ba6cda6ad6747e8840291ff06 Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Sat, 5 Feb 2011 06:36:23 +0000 Subject: [PATCH] Fixed #14984 -- Ensure that ClearableFileInput produces XHTML Strict output. Thanks to Luke for the report. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15426 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/forms/widgets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/forms/widgets.py b/django/forms/widgets.py index 6ee857a9fd..aa309a17a1 100644 --- a/django/forms/widgets.py +++ b/django/forms/widgets.py @@ -329,7 +329,7 @@ class ClearableFileInput(FileInput): if value and hasattr(value, "url"): template = self.template_with_initial - substitutions['initial'] = (u'%s' + substitutions['initial'] = (u'%s' % (value.url, value)) if not self.is_required: checkbox_name = self.clear_checkbox_name(name)