#39 — Some image description can breake the gallery Javascript

by Luca Fabbri last modified Aug 07, 2010 01:11 AM
State Resolved
Version: 0.9.1rc4
Area Functionality
Issue type Bug
Severity Medium
Submitted by Luca Fabbri
Submitted on Jul 26, 2010
Responsible Nathan Van Gheem
Target release: 1.0rc2
In a test of CPTG (0.9.1rc5) I generated image's description using a Lorem Ipsum generator.

This description someway breake the galley:

Maecenas ullamcorper auctor enim, a dapibus tellus aliquam vel. Donec nec commodo augue. Donec eu elit sem, vitae dignissim eros? Vivamus eget dapibus lorem? Mauris at diam diam. Nullam porta odio id.

After removing this the gallery works normally
Added by Nathan Van Gheem on Jul 26, 2010 12:38 PM
Responsible manager: (UNASSIGNED)vangheem
How does it break the gallery exacting?

Is there an error stack?

Which gallery display type are you using?
Added by Luca Fabbri on Jul 26, 2010 12:46 PM
Sorry, too quick and I give too few details.

The error was "unterminated string literal" and I've found the problems. Is not the text, but \n character inside the description. At the line of error I find this:

....
'http://localhost:8080/test/imags/P5290156.JPG/image_large' : {href : "http://localhost:8080/test/imags/P5290156.JPG/view", caption : "Maecenas ullamcorper auctor enim, a dapibus tellus aliquam vel. Donec nec commodo augue. Donec eu elit sem, vitae dignissim eros?
 Vivamus eget dapibus lorem? Mauris at diam diam. Nullam porta odio id.", thumbnail : "http://localhost:8080/[…]/image_tile" }
...

I'm using the "galleryview" template (with default Plone images, no picasa or other external data).
Added by Nathan Van Gheem on Jul 26, 2010 12:48 PM
Issue state: UnconfirmedConfirmed
Alright, thanks.

I should be handling those in the js.
Added by Nathan Van Gheem on Jul 28, 2010 11:58 AM
Issue state: ConfirmedResolved
fixed in trunk.
Added by Fabien Moret on Aug 06, 2010 07:08 AM
Hello!

I've seen the same problem of javascript breaking if I put a '"' (quote) in the description of an image.
I don't know if it has been fixed now.
Added by Nathan Van Gheem on Aug 07, 2010 01:11 AM
Target release: None1.0rc2
should be fixed in 1.0rc2

Let me know if you still see any issues.


Thanks!

No responses can be added.