Quotes in category name

Phoca Gallery - image gallery extension
rds76
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 11 Dec 2008, 12:59

Quotes in category name

Post by rds76 »

There is a bug if cat. name includes any quote char. Geotag javascript wont work then.
here is example with cat. name AAAA 'BBB:

Code: Select all

GEvent.addListener(marker_phoca_geo, 'click', function() {
			marker_phoca_geo.openInfoWindowHtml('AAAA 'BBB');
			});

error: missing ) after argument list
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49297
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Quotes in category name

Post by Jan »

Hi, where you get this error, in php file there is:

Code: Select all

GEvent.addListener(marker_phoca_geo, 'click', function() {
	marker_phoca_geo.openInfoWindowHtml('<?php echo $this->map['geotitle'];?>');
});
do you have some category with ' ?

On demo site, there is:

Code: Select all

GEvent.addListener(marker_phoca_geo, 'click', function() {
	marker_phoca_geo.openInfoWindowHtml('Austria - Wasserloch');
});

Jan
If you find Phoca extensions useful, please support the project
rds76
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 11 Dec 2008, 12:59

Re: Quotes in category name

Post by rds76 »

HI, error is from javascript console.
Problem is the ' (QUOTE) char which terminate string in param. of function openInfoWindowHtml, for example if u put cat. name "Vacation '08"

Understnad?
U have to double quote all quotes inside string.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49297
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Quotes in category name

Post by Jan »

ok
If you find Phoca extensions useful, please support the project
Post Reply