WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. JeanPaulH
    Member
    Posted 7 months ago #

    Hi,

    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.

    http://wordpress.org/plugins/simple-urls/

  2. MontysDouble
    Member
    Posted 3 weeks 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
    Member
    Posted 3 weeks 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 3 weeks 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
    Member
    Posted 3 weeks ago #

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

Reply

You must log in to post.

About this Plugin

About this Topic