Home : Products : Gossamer Links : Discussions :

Products: Gossamer Links: Discussions: Re: [Alex] escape_url bug in 2.1.2: Edit Log

Here is the list of edits for this post
Re: [Alex] escape_url bug in 2.1.2
Hi Alex,

Yeah, I think there's somethin happening during the clean_output when d=1.
When I try you're call from shell it comes out properly as well
But when I embed the variable into a url string it comes out with 2 ??'s

so going to this page: http://mydomain.com/page.cgi?p=test&d=1
and running this template code:
<a href="<%db_cgi_url%>/page.cgi?p=test&url=<%escape_url in_url%>">click here</a>
returns:
<a href="http://mydomain.com/cgi-bin/herbman/page.cgi?p=test&url=page.cgi?%3Fp%3Dtest%3Bd%3D1&d=1">here</a>

However ,
<%escape_url in_url%>
returns
page.cgi%3Fp%3Dtest%3Bd%3D1

Run the global and template below with the d=1 and without d. There is definitely a difference in the value that gets returned.
try this url: (d=1 there's parsing problems)
http://yourdomain.com/page.cgi?p=test&d=1

and this: (d= no parsing problems)
http://yourdomain.com/page.cgi?p=test

Here the's global for 'in_url'
sub {
return $IN->url;
}

Here's the template code for a file called 'test.html':
<html>
<head>
<body>
<a href="<%db_cgi_url%>/page.cgi?p=test&url=<%escape_url in_url%>">here</a>
<P>
in_url: <%in_url%><br>
url: <%if url%><%url%><%endif%><br>
escape_url: <%escape_url in_url%><br>
</body>
</html>


The code I posted in my first posting doesn't fix the escape_url, but I guess it automatically gets run when parsing, because the output gets fixed, but this is most likely the wrong location to fix this.

Last edited by:

klangan: Apr 24, 2003, 11:37 AM

Edit Log: