<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">​</div><div class="gmail_extra"><br><div class="gmail_quote">On 10 June 2017 at 08:51, Peter <span dir="ltr"><<a href="mailto:peter@pajamian.dhs.org" target="_blank">peter@pajamian.dhs.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid">On 10/06/17 09:10, IC wrote:<br>
> I am trying to stop the area tag from encoding a dash in the sku to %2d<br>
> in mv_arg in the url, ie when using:-<br>
><br>
> <a href="[area function/stock_alert [item-code]]">[L]In-Stock<br>
> Notification[/L]</a><br>
><br>
> If the sku is 100-10 the url generated is<br>
> /function/stock_alert?mv_arg=<wbr>100%2d10<br>
<br>
It shouldn't hurt anything, but if you want it to go away try this:<br>
[area href=function/stock_alert form="mv_arg=[item-code]"]<br>
<br>
> Where does the dash get encoded to %2d, I looked in Interpolate.pm and<br>
> various other files but couldn't work out where is was being encoded.<br>
><br>
> Can I make dash an allowed character somwhere?<br>
<br>
Alternatively you can replace the hexify function in Util.pm using a<br>
globalsub (in interchange.cfg):<br>
<br>
GlobalSub <<<EOR<br>
sub override_hacking {<br>
    package Vend::Util;<br>
    sub hexify {<br>
        my $string = shift;<br>
        $string =~ s/([^\w-])/sprintf '%%%02x', ord($1)/ge;<br>
        return $string;<br>
    }<br>
}<br>
EOR<br>
<br>
<br>
Peter<br></blockquote><div><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">​Thanks for all the replies, the GlobalSub did exactly what I needed.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Andy​</div></div><br></div></div>