Avatar of WestCoast_BC
WestCoast_BCFlag for Canada

asked on 

Submitted text via a form is being truncated if it contains a &

I have a website that using Coldfusion and it works fine. I have been trying to get the same website to work on a server running Unix and Railo. I have page that has a form with a textbox. When the form is submitted and the text contains an & I am finding that the submitted text is being truncated at the location of the &.

What do I do to be able to submit text that may contain a & (or any other characters that Railo has a problem with)?

Thank you
ColdFusion LanguageUnix OSWeb Development

Avatar of undefined
Last Comment
WestCoast_BC
Avatar of gdemaria
gdemaria
Flag of United States of America image

Is the form being submitted with Method="Get"  or "Post" ?   I would think this would not happen with Post.   Are you doing a <cfdump var="#form#">  very first thing on the post page to see what the values look like before being touched?
Avatar of WestCoast_BC
WestCoast_BC
Flag of Canada image

ASKER

Thanks, It is converted to &amp; but it is choking at the & character.  Method is post. I do have a cfdump on the page but it may not be first thing on the page. The dump is showing the text truncated. The form is being submitted via a Ajax.submit form call
Avatar of Trenton Knew
Trenton Knew

what about converting it to %26?
Avatar of WestCoast_BC
WestCoast_BC
Flag of Canada image

ASKER

I will try converting it to %26
Avatar of WestCoast_BC
WestCoast_BC
Flag of Canada image

ASKER

My problem is only happening on a UNIX server when I submit the form using ColdFusion.Ajax.submitForm.  If I submit the form by having the user click on a button that is a Submit type then it works fine.

I hope this helps to figure out what I am doing wrong.
ASKER CERTIFIED SOLUTION
Avatar of gdemaria
gdemaria
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of WestCoast_BC
WestCoast_BC
Flag of Canada image

ASKER

I have just tried encodeURIComponent and I think it looks like it is solving my problem
Web Development
Web Development

Web development includes all aspects of presenting content on intranets and the Internet, including delivery development, protocols, languages and standards, server software, browser clients, databases and multimedia generation.

77K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo