Advertisement

09.20.2007 at 06:13AM PDT, ID: 22841170
[x]
Attachment Details

Escaping commas in Coldfusion generated url

Asked by asaworker in ColdFusion Studio, ColdFusion Application Server, Cold Fusion Markup Language

Tags: comma, coldfusion, escape

I have a url that contains parameters based on the user's selection. In the title parameter a comma exists. This is causing the page to be displayed incorrectly. The url looks like:

http://mysite//coursereg.cfm?sortby=Course_Reg_Course_Title&filterby=Anchorage,%20Alaska%20Partnership%20Dialogue%20Series&direction=ASC


It should be

http://mysite//coursereg.cfm?sortby=Course_Reg_Course_Title&filterby=Anchorage,%20Alaska%20Partnership%20Dialogue%20Series&direction=ASC

to work properly

The Coldfusion code is

<cfparam name="sortby" default="Course_Reg_Created_On">
<cfif isDefined("url.sortby")>
      <cfset sortby = url.sortby>
</cfif>
<cfparam name="direction" default="DESC">
<cfif isDefined("url.direction")>
      <cfset direction = url.direction>
</cfif>
<cfparam name="filterby" default="All">
<cfif isDefined("url.filterby")>
      <cfset filter = url.filterby>
</cfif>
<cfparam name="titlesort" default="title ASC">

<cfquery datasource="#application.dsName#" username="#application.dsUserName#" password="#application.dsPassword#" name="courses1">
SELECT * FROM courses_regs
</cfquery>

<cfquery datasource="#application.dsName#" username="#application.dsUserName#" password="#application.dsPassword#" name="courses2">
SELECT Distinct Course_Reg_Course_Title FROM courses_regs
</cfquery>

<cfquery dbtype="query" name="courses">
SELECT * FROM courses1
<cfif listFindNoCase('#ValueList(courses2.Course_Reg_Course_Title,",")#', filterby)>
WHERE Course_Reg_Course_Title LIKE '%#filterby#%'
</cfif>
ORDER BY #sortby# #direction#
</cfquery>


Start Free Trial
 
Keywords: Escaping commas in Coldfusion genera…
 
Loading Advertisement...
 
[+][-]09.20.2007 at 06:30AM PDT, ID: 19928102

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.20.2007 at 06:58AM PDT, ID: 19928321

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.20.2007 at 07:10AM PDT, ID: 19928417

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.20.2007 at 07:15AM PDT, ID: 19928469

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: ColdFusion Studio, ColdFusion Application Server, Cold Fusion Markup Language
Tags: comma, coldfusion, escape
Sign Up Now!
Solution Provided By: srikanthmadishetti
Participating Experts: 1
Solution Grade: B
 
 
[+][-]09.20.2007 at 07:17AM PDT, ID: 19928480

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.20.2007 at 07:18AM PDT, ID: 19928487

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_1_20070628