Gossamer Forum
Quote Reply
Tilda ~
Howdy Folks,

I just noticed that my ~ (tildas) are converting to %7E when looking that the Links produced HTML. Is there a way to show ~ and not %7E. The %7E still resolves to the right url's.

Can anyone comment on this?

Thanks
Quote Reply
Re: [curman] Tilda ~ In reply to
Hi,

Surely it needs to be encoded to be valid HTML/XHTML?

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [curman] Tilda ~ In reply to
Where is it doing this?

Adrian

Last edited by:

brewt: Oct 26, 2005, 12:09 PM
Quote Reply
Re: [brewt] Tilda ~ In reply to
For example the url of the to be indexed site is

www.links.com/~john/

I will input this via the add form and add it into the database.

Then I create the static html page

The link will show up as

www.links.com/%7Ejohn/

on my static html pages

When I back to the links admin page a pull up that perticular record, the record will the also show the url containing %7E instead of the ~

Thoughts?
Quote Reply
Re: [curman] Tilda ~ In reply to
Try making this change (which will be included in the next release):

Code:
diff -u -b -r1.145 -r1.146
--- CGI.pm 21 Jun 2005 21:02:57 -0000 1.145
+++ CGI.pm 26 Oct 2005 19:24:50 -0000 1.146
@@ -461,7 +461,7 @@
#
my $toencode = pop;
return unless defined $toencode;
- $toencode =~ s/([^\w.-])/sprintf("%%%02X",ord($1))/eg;
+ $toencode =~ s/([^\w\-.!~*'()])/sprintf("%%%02X",ord($1))/eg;
return $toencode;
}
END_OF_SUB

to GT/CGI.pm

Adrian