" in caption doesn't display on slideshow

primedomain

Joined: 2002-11-09
Posts: 115
Posted: Mon, 2002-12-02 01:09

Hello,

latest CVS, PHP 4.1.1, Apache 1.3.26

I have entered the following caption: "blah blah"
On album.php as well as when looking at a photo, the caption displays like this. By contrast, in the slideshow, the caption is: blah blah, i.e. the " are missing.

Thanks.

 
alindeman
alindeman's picture

Joined: 2002-10-06
Posts: 8194
Posted: Mon, 2002-12-02 01:24

The slideshow script strips out quotes, semicolins, and newlines.
This is the code-snippet

$caption = str_replace(";", " ", $caption);
$caption = str_replace(""", " ", $caption);
$caption = str_replace("n", " ", $caption);
$caption = str_replace("r", " ", $caption);

I don't know why, as at least quotes could be escaped, like this

$caption = str_replace(""", "\"", $caption);

Gallery injects this into a Javascript application. Try replacing the second line of the code snippet with that line above. Not tested, but I don't see any problems.