Active
Project:
Image Caption
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
10 Dec 2011 at 04:22 UTC
Updated:
10 Dec 2011 at 04:22 UTC
I discovered this upon installing image_caption_filter and my first test case had
border-width:2px;
which was matching in the search for the image width and resulted in my image-left and caption only being allowed 2px.
I fixed it by modifying image_caption_filter.module line 115
from
if (preg_match('/width:\s*(\d+)px/i', $img_tag, $matches) == 1 |\
| preg_match ('/width=\"(\d+?)\"/i', $img_tag, $matches) == 1) {
to
if (preg_match('/(\s+|^)width:\s*(\d+)px/i', $img_tag, $matches) == 1 |\
| preg_match ('/(\s+|^)width=\"(\d+?)\"/i', $img_tag, $matches) == 1) {
Thanks also to this issue that helped explain how to get the whole thing configured and styled.