WordPress.org

Ready to get started?Download WordPress

Forums

Disabling wptexturize & symbol replacement (5 posts)

  1. jonfoster
    Member
    Posted 2 years ago #

    Hi,
    I have a weird problem where I'm trying to pass GET variables in a redirect URL - e.g. mywebsite.com?name=fred&age=35&location=london - but for some reason the & symbols are replaced by & in the URL - which of course doesn't work.

    I can fix this by commenting out the following line (85) from the formatting.php file:
    $curl = preg_replace('/&([^#])(?![a-zA-Z1-4]{1,8};)/', '&$1', $curl);

    But - my question is - what else does this line/wptexturize affect? Is this going to muck up my use of & symbols across the whole site?

    Thanks in advance!
    Jon

    Sorry for the weird code formatting by the way, but if I write & in one line it turns into an &!

  2. jonfoster
    Member
    Posted 2 years ago #

    Any ideas on this anyone?

    Jon

  3. Tom J Nowell
    Member
    Posted 2 years ago #

    A bit of a wildshot but have you tried this in functions.php?

    remove_action('wp_redirect','wptexturize');

  4. jonfoster
    Member
    Posted 2 years ago #

    Thanks - will try that - using GravityForms, so not sure if that used wp_redirect....
    J

  5. aehageman
    Member
    Posted 2 years ago #

    What did you figure out on this issue? all my & are replaced with & in all my affiliate links thus making them not track to me..

    Thanks..

Topic Closed

This topic has been closed to new replies.

About this Topic