Image caption filter was incorrectly matching empty title attributes that are created in image tags that are added to WYSIWYG editors when using the Insert module. The attribute title="" was matched by the regex on line 107 of the module, causing some of the image tag's attribute code to show up as an unwanted caption.

I was able to solve the problem by adding the following code before line 107 to remove the empty title attributes:

// remove blanks
$img_tag = preg_replace('/title=\"\"/i','',$img_tag);

There might be a better way to address the problem by rewriting the regex on line 107, but I am actually a designer and not a developer and therefore don't know much about regex. Or creating and posting patches, for that matter. I humbly request that someone with more skillz address this issue.

Comments

quicksketch’s picture

Status: Active » Fixed

This has been fixed in #1126994: 2 double-spaces causes wrong path when using Transliteration via a JavaScript approach.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.