Not wanted Characters.

Post Reply
gerry.odea
Posts: 98
Joined: Fri Sep 19, 2008 9:33 am

Not wanted Characters.

Post by gerry.odea »

Here is my sample script.

<a name=SEARCH>
<$searchurl = "http://www.whateverurl.com/?useragent=uayzzy">
1.searchurl=$searchurl<P>
<$useragent=" Thunderstone Support ">
<strfmt "%U" $useragent>
<$useragent=$ret>
2.useragent=$useragent<P>
<sandr "uayzzy" $useragent $searchurl>
<$liveurls = $ret>
3.liveurls=$liveurls
</a>


The output is:

1. searchurl=http://www.whateverurl.com/useragent=uayzzy

2. useragent=+Thunderstone+Support+

3. liveurls=http://www.whateverurl.com/useragent=1T ... e2Support3

Why is the output in #3 showing 1Thunderstone2Support3 and not +Thunderstone+Support+


Thanks in Advance.
Gerry
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

Not wanted Characters.

Post by mark »

Because + is special in sandr replace strings.
If you're going to use arbitrary strings in a replace you need to escape special chars first. See the sandr docs for what characters are special.
Post Reply