Closed (fixed)
Project:
Caption Filter
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
17 Sep 2011 at 00:36 UTC
Updated:
1 Oct 2011 at 21:51 UTC
Jump to comment: Most recent file
Comments
Comment #1
quicksketchI've taken a partial suggestion from #934844: Support WordPress [caption] syntax (implement full quicktags.inc file) and utilized the WordPress function for shortcode_parse_atts() in this patch. This function is responsible for taking the attributes string and turning it into an array of attributes. It handles single quotes, double quotes, no quotes at all, and attributes that are merely single words (i.e. "checked" in HTML4) and parses them all nicely into an array.
This is a bit much for what we need currently, since we only support one attribute ("align"), but it does solve immediate problems with our implementation such as the align attribute only working without quotes or breaking if there were more than one space between the opening
[captiontag and the attribute "align". In any case I think it's a good move for us to bring ourselves inline with the functionality we're imitating as much as possible.I've committed this patch to both D6 and D7 branches.