So everything works fine when I try to use this with any non-Lightbox preset. But when I select a Lightbox preset for my insert, the code comes through mangled. This is using a TinyMCE editor, so there are two versions that get inserted.
Rich Text Disabled
<a rel="lightbox[group1][<br /><br /><a href="http://yosemitespace.com/sites/default/files/imagecache/product_full/caldera-cutaway.jpg" target="_blank" id="lightbox2-download-link-text">Download Original</a>]" href="http://yosemitespace.com/sites/default/files/imagecache/product_full/caldera-cutaway.jpg"><img src="http://yosemitespace.com/sites/default/files/imagecache/product_list/caldera-cutaway.jpg" alt="" title="" class="imagecache-product_list" /></a>
So somehow it's ending up with nested A tags
Rich Text Endabled
Here it inserts the same code, but the embedded BR and A tags get converted so that the brackets get converts to entities. It looks like this
<a id="lightbox2-download-link-text" rel="lightbox[group1][<br ></a><br /><a href=" href="http://yosemitespace.com/sites/default/files/imagecache/product_full/caldera-cutaway.jpg" target="_blank">Download Original</a>]" href="http://yosemitespace.com/sites/default/files/imagecache/product_full/caldera-cutaway.jpg"><img class="imagecache-product" src="http://yosemitespace.com/sites/default/files/imagecache/product/caldera-cutaway.jpg" alt="" />
Comments
Comment #1
ergophobe CreditAttribution: ergophobe commentedPS, this is with all Input Filters disabled except the Lightbox filter.
Comment #2
quicksketchI don't use Lightbox, so it's unlikely that I'll be taking a look at this problem. Any patches appreciated.
Comment #3
ergophobe CreditAttribution: ergophobe commentedSo when I'm in insert.js and setting some breakpoints in firebug, at line 41, the content property has the value
By the time I get down to line 61, it's got the value given in my original post
That is to say, it has stripped the "__description__".
Comment #4
abaddon CreditAttribution: abaddon commentedi think this is related to http://drupal.org/node/479310#comment-2188954 and http://drupal.org/node/613946 (where this feature got added), shouldnt the bug be moved there? i think the markup is generated using lightbox2/lightbox2-insert-image.tpl.php
Comment #5
ergophobe CreditAttribution: ergophobe commentedThanks - this seems to be fixed with the latest release and dev versions of Lightbox2, released on Sept 24
#613946: Add neccessary hooks to work with Insert module
Comment #6
ergophobe CreditAttribution: ergophobe commentedComment #7
ergophobe CreditAttribution: ergophobe commentedMy mistake. This is actually not fixed with the latest releases of Lightbox2
Comment #8
quicksketchMoving over to LB2.
Comment #9
toomanypets CreditAttribution: toomanypets commentedI'm having the same problem:
Lightbox2 6.x-1.x-dev (2010-Sep-24)
Insert 6.x-1.0-beta6
Comment #10
toomanypets CreditAttribution: toomanypets commentedThis appears to be related to, or perhaps duplicate of, #830092: Insert module Download original.
Comment #11
toomanypets CreditAttribution: toomanypets commentedAs a work-around until this issue is addressed, without hacking the code, you can set the "Text for image original link:" to blank under Text Settings on admin/settings/lightbox2.
Comment #12
ergophobe CreditAttribution: ergophobe commentedDefinitely a duplicate of #830092: Insert module Download original