Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Search

 
Advanced search

8054 Posts in 1860 Topics- by 2099 Members - Latest Member: roi
Pages: [1]   Go Down
Print
Author Topic: $CGI_URL_QUERYSTRING only sometimes encoded?  (Read 917 times)
0 Members and 1 Guest are viewing this topic.
TechnoShroom
New Member
*

Karma: 0
Offline Offline

Posts: 14


WWW
« on: September 01, 2008, 03:43:00 AM »

When you visit the default page the URLs are all encoded correctly with & for & but when you click any link, the links on the following pages are not encoded.  What is the fix for this?
Logged
DanO
Full Member
***

Karma: 13
Offline Offline

Posts: 235

Please don't PM me. Post in the open forum.


WWW
« Reply #1 on: September 01, 2008, 09:38:53 PM »

Quote
with & for &

That must be a function of your browser you're viewing it with because the script generates the real URL code (ie. NOT using HTML entities) as should be able to be seen by searching for "CGI_URL_QUERYSTRING" in the calendar.pl file. One excerpt follows:

Quote
&ASPCustomTag('\s*LAST\s*MONTH\s*LINK\s*','= $CGI_URL_QUERYSTRING."year=".$LAST_MONTH_YEAR."&month=".$LAST_MONTH');

Note the &month= and it not being &month=

Try looking at the calendar pages in a different browser.

JMO

Dan O.
« Last Edit: September 02, 2008, 12:20:25 AM by DanO » Logged
TechnoShroom
New Member
*

Karma: 0
Offline Offline

Posts: 14


WWW
« Reply #2 on: September 02, 2008, 05:59:32 AM »

I'm aware of that section of calendar. pl and I did change those to "&" instead of "&" without ill effect.

I'm probably incorrect as to what's causing this but when you first view the calendar (regardless of the above change) the event links are like this. . .
calendar. pl?view=Event&event_id=5592

Then for example you click the month link (again regardless of the change) and the event links are like this. . .
calendar. pl?view=Month&view=Event&event_id=5592

The first "&" isn't encoded but the second is.

There are a number of places where different parts of the URL are joined with "&" but the changes I've tried break different aspects of the script.
Logged
TechnoShroom
New Member
*

Karma: 0
Offline Offline

Posts: 14


WWW
« Reply #3 on: September 02, 2008, 07:52:21 AM »

I changed. . .
if ($QUERY_STRING ne "") { $QUERY_STRING . = "&"; }
and. . .
if ($QUERY_STRING ne "") { $Template::CGI_URL_QUERYSTRING . = "&"; }

to. . .
if ($QUERY_STRING ne "") { $QUERY_STRING . = "&"; }
and. . .
if ($QUERY_STRING ne "") { $Template::CGI_URL_QUERYSTRING . = "&"; }

I had done this originally but it broke the filter which made me think this would be the wrong way of going about this.  However, it doesn't look like it's breaking anything else so I just did a string replace on $CGI_URL_QUERYSTRING in the filter to switch "&" back to "&".  Seems to work, at least I haven't found any problems but it seems like too simple a solution to be right.
Logged
Pages: [1]   Go Up
Print
Jump to: