Removing a Return Code

Post Reply
dysart
Posts: 1
Joined: Wed Sep 20, 2000 4:23 pm

Removing a Return Code

Post by dysart »

I'm passing a variable from a cgi script that has a <return> in it (%250D%250A) I'm trying to use <strfmt> to remove the code from the variable. It's not working. Please help me. I have tried just about everything.

Thanks
Dysart
User avatar
John
Site Admin
Posts: 2622
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:

Removing a Return Code

Post by John »

<sandr> is the usual function for search and replace.

<sandr "\x0d\x0a" "" $var>
<$var=$ret>

should to what you want, although it looks as if you may have a variable that has been URL encoded more than once. You might need:

<sandr "%0d%0a" "" $var> or even what is in you text:
<sandr "%250d%250a" "" $var>
John Turnbull
Thunderstone Software
Post Reply