[wp-trac] [WordPress Trac] #43155: Formatting bug with ampasands - WooCommerce Layered Nav

WordPress Trac noreply at wordpress.org
Wed Jan 24 14:39:14 UTC 2018


#43155: Formatting bug with ampasands - WooCommerce Layered Nav
--------------------------+-----------------------------
 Reporter:  jimleeder     |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Formatting    |    Version:  4.7.5
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 I found a problem with the WooCommerce layered nav plugin caused by
 WordPress itself. When you have products shown filtered by an attribute
 (for example - red) and then click the number of products to show (such as
 45) upon page load the ampasand (&) changes to the HTML entity instead.

 I commented out a few lines on wp-includes/formatting (example - line 238
 - $curl = preg_replace( '/&(?!#(?:\d+|x[a-f0-9]+);|[a-z1-4]{1,8};)/i',
 '&', $curl );) which now stops this happening.

 Please have a look as I know this will be overwritten when WordPress is
 next updated.

 Best Regards,

 Jim.

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


More information about the wp-trac mailing list