Commit 704f4242 authored by Fabien Morin's avatar Fabien Morin

the html render of ImageFields was not XHTML valid (5 error and 2 advertisments on

w3c test but 0 error on tidy test, so this field passed the unitTest without
failure)


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@19800 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 660203c8
......@@ -75,10 +75,12 @@ class ImageFieldWidget(Widget.TextWidget):
"""
# Url is already defined in value
image = value
description = field.getDescription() or 'field_description'
display = field.get_value('image_display')
format = field.get_value('image_format')
resolution = field.get_value('image_resolution')
html_string = """<img src="%s?display=%s&format=%s&resolution=%s" />""" % (image, display, format,resolution)
html_string = """<img src="%s?display=%s&nbsp;format=%s&nbsp;resolution=%s" alt="%s"/>""" % \
(image, display, format,resolution, description)
return html_string
ImageFieldWidgetInstance = ImageFieldWidget()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment