Announcement

Collapse
No announcement yet.

Ampersand (&) woes

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Ampersand (&) woes

    Hi,

    Tearing my hair out trying to suss this and decided that it is time to ask an expert *beg*.

    So I have hardcoded an advanced search that contains an ampersand as part of the search string. When I replace it with a ' & # 3 8 ;' (spaced intentionally so that your browser doesnt turn it into a '&') and test it manually in the browser (by pasting into the url field) all works well.

    Now when I pop that code onto a page in Actinic somehow evil gremlins turn it back into an ampersand '&' and I get a lovely Actinic error

    Code:
    Error: Bad input string "RANDOM=NETQUOTEVAR%3ARANDOM&PAGE=SEARCH&SS=&TB=A&PR=-1&S_REGION0_0=France+-+Bordeaux+-+Listrac+&+Moulis&GB=A&ACTION=Search". Argument count 16.
    I know why, it doesn't like the extra '&'!

    Does anyone know how I can put the '&' into the search string and keep it there?

    I'm going rather mad so please put me out of my misery.

    it becomes

    <a href="http://www.christopherpiperwines.co.uk/cgi-bin/ss000001.pl?RANDOM=NETQUOTEVAR%3ARANDOM&PAGE=SEARCH&SS=&TB=A&PR=-1&S_REGION0_0=France+-+Bordeaux+-+Listrac+&+Moulis&GB=A&ACTION=Search">Listrac &amp; Moulis</a>

    Help

    Alex
    Blog, Twitter, Facebook
    Actinic Ecommerce, CMS and Video production

    www.petraboase.com
    www.progrow.co.uk
    www.christopherpiperwines.co.uk
    www.cheeksandcherries.co.uk
    www.skatewarehouse.co.uk

    #2
    The & character is a separator in search strings so you're inadvertantly splitting your input in two. Try using %26 instead.

    You should probably encode all your non alphanumeric so.
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment

    Working...
    X