Gossamer Forum
Home : Products : Gossamer Links : Discussions :

special characters in globals

Quote Reply
special characters in globals
hello i need a javascript query that's printen in a global but it removes the necessary \ (backslash) character how to dissolve this:

example:

sub {
my $vals = shift;
my $cat_db = $DB->table ('Category');
$cat_db->select_options ('ORDER BY Full_Name DESC');
my $sth = $cat_db->select;
my $output = '';
while (my $cat = $sth->fetchrow_hashref) {
$output .= qq~newstr$cat->{ID}=str$cat->{ID}.replace(/(\)s/gi, " ");
~;
}
return $output;
}

a global with javascript array:
i need the tag (/(\)s/gi, " ");
this will replace whitespaces in urls for an character,
(for netscape)
links-SQL NG will remove \ from the global
i get:
(/()s/gi, " ");
and jacascript will not work.

who can help me????


Quote Reply
Re: special characters in globals In reply to
Just off hand... did you try the double \\ ?? that is usually how you escape the escape character.

PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://pugdog.com/FAQ


Quote Reply
Re: special characters in globals In reply to
thank you it works now