[wp-trac] [WordPress Trac] #10743: WP rewrite rule bug with & in url path

WordPress Trac noreply at wordpress.org
Sat Sep 20 00:45:40 UTC 2014


#10743: WP rewrite rule bug with & in url path
--------------------------+-----------------------------
 Reporter:  stephdau      |       Owner:
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:  Future Release
Component:  Permalinks    |     Version:
 Severity:  normal        |  Resolution:  worksforme
 Keywords:  needs-patch   |     Focuses:
--------------------------+-----------------------------
Changes (by loushou):

 * status:  assigned => closed
 * resolution:   => worksforme


Comment:

 This problem is already solved in 4.0. Looks like a simple patch to the
 `WP_MatchesMapRegex()` class solved the problem:


 {{{
   public function callback($matches) {
     $index = intval(substr($matches[0], 9, -1));
     return ( isset( $this->_matches[$index] ) ?
 urlencode($this->_matches[$index]) : '' );
   }
 }}}

 The urlencode bit, on the return line, resolves the & issue.

 This should be closed.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/10743#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list