ColdFusion Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreColdFusion Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
1200+ fellow developers rate and compare features of the top IDEs, like Visual Studio, Eclipse, RAD, Delphi and others, across 13 categories. Enjoy this FREE Download of the IDE User Satisfaction Study by Evans Data Corporation. Download Now!
  #1  
Old March 3rd, 2005, 09:56 AM
NightVa NightVa is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Posts: 67 NightVa User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 15 h 31 m 33 sec
Reputation Power: 5
CGI.QUERY_STRING and escaped URL elements

Hi all,

I'm now using CGI.QUERY_STRING to send URL variables to an action page.

the syntax of the URL is: index.cfm?something=something&somethingelse=somethingelse

I know the escaped code for ampersand is & and all of my hard coded URL variables use the escaped method. BUT CGI.QUERY_STRING seems to revert the escaped ampersand back into a "&" BEFORE the request is sent to the server.

This doesn't break my application BUT it creates a standards compliancy problem. I want my HTML to validate at the W3.org
but the unescaped "&" is NOT standard compliant.

Can anyone help me? I think this might be a unique question in this forum.

Nathan

Reply With Quote
  #2  
Old March 3rd, 2005, 10:20 AM
kiteless kiteless is offline
Moderator
Dev Shed Expert (3500 - 3999 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 3,618 kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 4 Days 9 h 44 m 33 sec
Reputation Power: 53
You can try using URLDecode() to convert it back to a standard ampersand.
__________________
Ask if you have a question, but also help answer questions that you have knowledge of! Thanks, Brian.
How to Post a Question in the Forums

Reply With Quote
  #3  
Old March 5th, 2005, 08:25 AM
NightVa NightVa is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Posts: 67 NightVa User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 15 h 31 m 33 sec
Reputation Power: 5
How do I write URLEncode and URLDecode?

Up to now, I've never used URLDecode and URLEncode for certain reasons. This means I don't know the syntax or code structure to make your suggestion work.

This is the string I need to encode then decode.

action="<cfoutput>#CGI.SCRIPT_NAME#?#CGI.QUERY_STRING#</cfoutput>"

Will the ENCODE go between the pounds on the QUERY_STRING or somewhere else? How to I DECODE this string and where?

Thanks...
Nathan

Reply With Quote
  #4  
Old March 5th, 2005, 10:15 AM
kiteless kiteless is offline
Moderator
Dev Shed Expert (3500 - 3999 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 3,618 kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 4 Days 9 h 44 m 33 sec
Reputation Power: 53
I'd just try it a few different ways. Maybe something like this?

action="<cfoutput>#CGI.SCRIPT_NAME#?#urlDecode( CGI.QUERY_STRING )#</cfoutput>"

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreColdFusion Development > CGI.QUERY_STRING and escaped URL elements


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway