[wp-trac] [WordPress Trac] #40014: & converted to '#038

WordPress Trac noreply at wordpress.org
Thu Mar 2 08:41:48 UTC 2017


#40014: & converted to '#038
--------------------------+-----------------------------
 Reporter:  fervillz      |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Themes        |    Version:  4.7.2
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 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

--
Ticket URL: <https://core.trac.wordpress.org/ticket/40014>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list