Simple URLs
Issue with brackets in affiliate URLs (5 posts)

  1. JeanPaulH
    Posted 2 years ago #


    I'm seeing an issue with affiliate URLs which are using brackets for parameters. The brackets seem to confuse Simple URLs in its interpreting of query parameters.

    European affiliate network Zanox uses this format for deeplink URLs:

    http%3A%2F%2Fad.zanox.com%2Fppc%2F%3F26447164C49580124%26ulp%3D%5B%5B%2Fiphone%5D%5D%26zpar0%3D%5B%5BAutolink%5D%5D (url encoded because Codex insists on mangling the brackets as well, sigh ...)

    Gist: https://gist.github.com/jphorn/0724bf9038a078616b5a

    When using this redirect URL in Simple URLs, the resulting redirected URL is:

    https://www.studentmobiel.nl/iphone&zpar0=Autolink?utm_source=ZANOX&utm_medium=cpa&utm_campaign=ZANOX&zanpid=1848370874215175169&utm_term=1221992 (which results in an error page)

    Please notice the wrong interpretation/order of the query parameters (ampersand first and question mark 2nd). This only happens with these brackets redirect URLs.


  2. MontysDouble
    Posted 2 years ago #

    Just hit the same issue. And it is not only Zanox, I have other networks using round brackets in the URLs.

    Did you make any progress on a work around or anything?

    I've read this other thread on the plugin and someon dealing with an encoding of the pipe character.

    However the affiliate networks interstitial servers do not seem to like ( and ) supplied as encoded characters either, it needs them sent as brackets.

  3. JeanPaulH
    Posted 2 years ago #

    My only workaround now is to feed Simple URL's a shortened link (via bitly) of the affiliate link. So far this only affects Zanox platform for me. It's an extra (unwanted) redirect), but better than nothing.

    Thus Zanox > Bitly > Simple URLs

  4. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 2 years ago #

    The wp_redirect function strips out unsafe characters.

    A { can be used to inject code so it is one of the characters stripped out.

  5. JeanPaulH
    Posted 2 years ago #

    Does this also apply to straight brackets? [ ] That's our issue. And is there a way to override the function?

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Simple URLs
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic