plone/plone.outputfilters — pull request #5 by datakurre (2012-10-19 13:54:05+00:00)
Title: Image captioning fails when an image with relative path and without scale is embedded in news item

A corner case, I'd guess. Failing test attached.

How to reproduce (on Plone 4.2)

1. Enable image captioning.
2. Add a new image (e.g. image.jpg).
3. Add a new news item.
4. Embed that image with relative path and without scaling information (e.g.
5. Get a stacktrace:

Module plone.outputfilters.transforms.html_to_plone_outputfilters_html, line 47, in convert
Module plone.outputfilters, line 6, in apply_filters
Module plone.outputfilters.filters.resolveuid_and_caption, line 102, in __call__
Module sgmllib, line 104, in feed
Module sgmllib, line 138, in goahead
Module sgmllib, line 296, in parse_starttag
Module sgmllib, line 338, in finish_starttag
Module plone.outputfilters.filters.resolveuid_and_caption, line 335, in unknown_starttag
Module plone.outputfilters.filters.resolveuid_and_caption, line 255, in handle_captioned_image
Module plone.app.imaging.scaling, line 201, in getImageSize

AttributeError: getSize

This is caused by the following line accepting the news item object in question as ``fullimage``, because news item object has ``tag``-method.

https://github.com/plone/plone.outputfilters/blob/master/plone/outputfilters/filters/resolveuid_and_caption.py#L240