Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Re: [Thomas.] Ampersand in URLs

Quote Reply
Re: [Thomas.] Ampersand in URLs In reply to
What I did, as suggested by Alex, was to edit admin/links/Category.pm and find the section:

Code:
sub _clean {
# -------------------------------------------------------------------
# Cleans up a name.
#
my $name = shift;
$name =~ s/\s/_/g;
$name =~ s/[^\w\d_\-\/]/_/g;
return $name;
}

Comment out:

Code:
$name =~ s/[^\w\d_\-\/]/_/g;

so that is looks like:

Code:
sub _clean {
# -------------------------------------------------------------------
# Cleans up a name.
#
my $name = shift;
$name =~ s/\s/_/g;
# $name =~ s/[^\w\d_\-\/]/_/g;
return $name;
}

This will still change the spaces to _ but not the special characters. Just be careful when naming categories with odd characters because it might cause a problem. I've had good luck with it so far. Most characters escape themselves properly via the browser so they're not a problem.

Sean
Subject Author Views Date
Thread Ampersand in URLs Thomas. 11135 Feb 19, 2003, 9:43 AM
Thread Re: [Thomas.] Ampersand in URLs
Andy 10880 Feb 19, 2003, 9:56 AM
Thread Re: [Andy] Ampersand in URLs
Thomas. 10887 Feb 19, 2003, 10:02 AM
Thread Re: [Thomas.] Ampersand in URLs
Andy 10895 Feb 19, 2003, 10:04 AM
Thread Re: [Andy] Ampersand in URLs
Thomas. 10897 Feb 19, 2003, 10:21 AM
Thread Re: [Thomas.] Ampersand in URLs
Andy 10871 Feb 19, 2003, 10:26 AM
Post Re: [Andy] Ampersand in URLs
Thomas. 10883 Feb 19, 2003, 10:29 AM
Thread Re: [Thomas.] Ampersand in URLs
SeanP 10852 Feb 19, 2003, 12:38 PM
Thread Re: [SeanP] Ampersand in URLs
Thomas. 10898 Feb 19, 2003, 1:05 PM
Thread Re: [Thomas.] Ampersand in URLs
SeanP 10876 Feb 19, 2003, 1:16 PM
Thread Re: [SeanP] Ampersand in URLs
Thomas. 10494 Nov 8, 2010, 2:04 AM
Thread Re: [Thomas.] Ampersand in URLs
Andy 10542 Nov 8, 2010, 2:56 AM
Thread Re: [Andy] Ampersand in URLs
Thomas. 10507 Nov 8, 2010, 3:07 AM
Post Re: [Thomas.] Ampersand in URLs
Andy 10478 Nov 8, 2010, 3:09 AM
Thread Re: [Thomas.] Ampersand in URLs
Andy 10468 Nov 8, 2010, 3:02 AM
Post Re: [Andy] Ampersand in URLs
Thomas. 10449 Nov 8, 2010, 3:07 AM