From 80241db44694dbe28136e203212ae83626f3df6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Domen=20Ko=C5=BEar?= Date: Wed, 22 Feb 2012 23:29:34 +0100 Subject: [PATCH] alt/title attributes should now appear on img tags even if uid linking is not enabled, refs https://dev.plone.org/ticket/12322 --- CHANGES.txt | 3 +++ plone/outputfilters/filters/resolveuid_and_caption.py | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index b10c2c4..627c13e 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,6 +4,9 @@ Changelog 1.2 - unreleased ---------------- +- alt/title attributes on img tags were not present if tinymce uid linking was not used + [iElectric] + - When making relative URIs absolute, use the parent as the relative root when the context is not folderish. Fixes an issue where relative URLs from Plone 3, for example, had the wrong URLs under diff --git a/plone/outputfilters/filters/resolveuid_and_caption.py b/plone/outputfilters/filters/resolveuid_and_caption.py index 1e14a26..a2520d6 100644 --- a/plone/outputfilters/filters/resolveuid_and_caption.py +++ b/plone/outputfilters/filters/resolveuid_and_caption.py @@ -94,7 +94,8 @@ def resolve_uids(self): def is_enabled(self): if self.context is None: return False - return self.captioned_images or self.resolve_uids + else: + return True def __call__(self, data): self.feed(data) @@ -328,7 +329,7 @@ def unknown_starttag(self, tag, attrs): self.handle_captioned_image(attributes, image, fullimage, caption) return True - elif fullimage is not None: + if fullimage is not None: # Check to see if the alt / title tags need setting title = aq_acquire(fullimage, 'Title')() if 'alt' not in attributes: