In function flickr_filter_split_config a preg_match_all using the regex '/([a-zA-Z]+)=([-@0-9a-zA-Z:;]+)/' appears to be used to parse the parameters passed.
The statement is
preg_match_all('/([a-zA-Z]+)=([-@0-9a-zA-Z:;]+)/', $string, $parts, PREG_SET_ORDER);
I would like to be able to pass more than one class to the filter, but when passed as
[flickr-photo:id=nnn,size=m,class=class1 class2]
only the first class is handled.
When passed as
[flickr-photo:id=nnn,size=m,class="class1 class2"] or
[flickr-photo:id=nnn,size=m,class='class1 class2']
no class information makes it through.
Is this a fixable problem or should I work on the basis that multiple classes can not be passed?
https://drupal.org/node/147152#comment-561346 seems to indicate that multiple classes should be possible, though this was posted quite a while ago.
Thanks,
Alan
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | multiple_css_classes-2116165-2.patch | 974 bytes | lolandese |
Comments
Comment #1
lolandese commentedSorry for getting back on this with delay.
No, this should get fixed.
Thanks for your background info. I will try to look into it asap. If meanwhile you found other clues, please let me know.
Comment #2
lolandese commentedSolved by adding a space. :-\
Your syntax has to look like:
[flickr-photo:id=9247386562, size=m, class=foo bar, style=float:left;]Thus without quotes.
Comment #3
Anonymous (not verified) commentedlolandese,
Sorry about the delay in getting back - your patch works fine and I'm now able to pass through additional css classes.
Thanks a lot for your help with this, it's much appreciated,
Alan
Comment #4
Anonymous (not verified) commentedComment #5
lolandese commentedCommitted. See http://drupalcode.org/project/flickr.git/commitdiff/4aac3a0.
Thank you Alan.