use esc_url_raw when building permalinks to avoid replacing ampersands with entities - updates #27008