Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #20771, comment 8

Timestamp:
02/26/2013 09:12:32 AM (11 years ago)
Author:
johnbillion
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #20771, comment 8

    initial v1  
    11This change has introduced an encoding bug, albeit an indirect one.
    22
    3 `esc_html()` encodes ampersands as `&` but `esc_url()` encodes ampersands as `&`. Passing a URL through `add_query_arg()` will mangle the URL if it contains ampersands encoded as '&'.
     3`esc_html()` encodes ampersands as `&` but `esc_url()` encodes ampersands as `&`. Passing a URL through `add_query_arg()` will mangle the URL if it contains ampersands encoded as .
    44
    55My [http://wordpress.org/extend/plugins/user-switching/ User Switching] plugin has broken since this change because the plugin uses `add_query_arg()` on a URL that's already been passed through `wp_nonce_url()`.