[ic] area tag encoding dash in sku to %2d
IC
ic at tvcables.co.uk
Sun Jun 11 08:26:27 UTC 2017
On 10 June 2017 at 08:51, Peter <peter at pajamian.dhs.org> wrote:
> On 10/06/17 09:10, IC wrote:
> > I am trying to stop the area tag from encoding a dash in the sku to %2d
> > in mv_arg in the url, ie when using:-
> >
> > <a href="[area function/stock_alert [item-code]]">[L]In-Stock
> > Notification[/L]</a>
> >
> > If the sku is 100-10 the url generated is
> > /function/stock_alert?mv_arg=100%2d10
>
> It shouldn't hurt anything, but if you want it to go away try this:
> [area href=function/stock_alert form="mv_arg=[item-code]"]
>
> > Where does the dash get encoded to %2d, I looked in Interpolate.pm and
> > various other files but couldn't work out where is was being encoded.
> >
> > Can I make dash an allowed character somwhere?
>
> Alternatively you can replace the hexify function in Util.pm using a
> globalsub (in interchange.cfg):
>
> GlobalSub <<<EOR
> sub override_hacking {
> package Vend::Util;
> sub hexify {
> my $string = shift;
> $string =~ s/([^\w-])/sprintf '%%%02x', ord($1)/ge;
> return $string;
> }
> }
> EOR
>
>
> Peter
>
Thanks for all the replies, the GlobalSub did exactly what I needed.
Andy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.icdevgroup.org/pipermail/interchange-users/attachments/20170611/c2b9a182/attachment.html>
More information about the interchange-users
mailing list