Opened 8 years ago
Last modified 8 years ago
#40014 new defect (bug)
& converted to '#038
Reported by: | fervillz | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 4.7.2 |
Component: | Themes | Keywords: | |
Focuses: | Cc: |
Description
Hi guys,
This is a follow-up to #30831.
Using WordPress v4.7.2 . With paginate_links() and setting the 'add_args' to an an array of values breaks the url. Specifically replaces & with #038;
Sample code below:
echo paginate_links( array( 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ), 'current' => max( 1, get_query_var( 'paged' ) ), 'total' => $query_object->max_num_pages, 'format' => 'page/%#%', 'add_args' => array( 'project' => 1 /* or whatever the project number is*/ ), ) );
The code above replaces & with #038;
Sample result: http://domain.com/?page_id=1&paged=2#038project=1
Attachments (1)
Change History (4)
Note: See
TracTickets for help on using
tickets.
Yes, the link you provided does change
&
to#038
but for me it did not happen. I am using the similar code:URLs still come up as
http://local.tourplanner.com/page/2?place=1&type=4
.Browser: Chrome
WP Version: 4.7.2
Theme: Custom (no child theme)
Two differences between yours and mine are:
Screenshot attached. Neither Status bar nor the Address bar has converted
&
to#038
.