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. 8275 Feb 19, 2003, 9:43 AM
Thread Re: [Thomas.] Ampersand in URLs
Andy 8079 Feb 19, 2003, 9:56 AM
Thread Re: [Andy] Ampersand in URLs
Thomas. 8093 Feb 19, 2003, 10:02 AM
Thread Re: [Thomas.] Ampersand in URLs
Andy 8092 Feb 19, 2003, 10:04 AM
Thread Re: [Andy] Ampersand in URLs
Thomas. 8085 Feb 19, 2003, 10:21 AM
Thread Re: [Thomas.] Ampersand in URLs
Andy 8063 Feb 19, 2003, 10:26 AM
Post Re: [Andy] Ampersand in URLs
Thomas. 8082 Feb 19, 2003, 10:29 AM
Thread Re: [Thomas.] Ampersand in URLs
SeanP 8048 Feb 19, 2003, 12:38 PM
Thread Re: [SeanP] Ampersand in URLs
Thomas. 8088 Feb 19, 2003, 1:05 PM
Thread Re: [Thomas.] Ampersand in URLs
SeanP 8064 Feb 19, 2003, 1:16 PM
Thread Re: [SeanP] Ampersand in URLs
Thomas. 7663 Nov 8, 2010, 2:04 AM
Thread Re: [Thomas.] Ampersand in URLs
Andy 7715 Nov 8, 2010, 2:56 AM
Thread Re: [Andy] Ampersand in URLs
Thomas. 7698 Nov 8, 2010, 3:07 AM
Post Re: [Thomas.] Ampersand in URLs
Andy 7683 Nov 8, 2010, 3:09 AM
Thread Re: [Thomas.] Ampersand in URLs
Andy 7672 Nov 8, 2010, 3:02 AM
Post Re: [Andy] Ampersand in URLs
Thomas. 7653 Nov 8, 2010, 3:07 AM