#038 & wordpress Help

esc_url() has a $_context argument which defaults to ‘display’. It will replace & with & unless you change context to something else, e.g. sanitize_url uses ‘db’. (Why it uses & instead of the usual & I don’t understand, but it’s deliberate.)

I’m guessing you’re calling esc_url() somewhere in your code where you should be calling esc_url_raw() or sanitize_url() (which are identical) instead. These will not substitute &s.

tech