[wp-trac] [WordPress Trac] #57955: wp_localize_jquery_ui_datepicker parsing general settings date_format wrong

WordPress Trac noreply at wordpress.org
Mon Mar 20 10:23:54 UTC 2023


#57955: wp_localize_jquery_ui_datepicker parsing general settings date_format wrong
--------------------------+-------------------------------
 Reporter:  naamb         |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Date/Time     |    Version:  6.1.1
 Severity:  minor         |   Keywords:  changes-requested
  Focuses:                |
--------------------------+-------------------------------
 Hi,

 I found that function **wp_localize_jquery_ui_datepicker** under wp-
 includes/script-loader.php isn't formatting **date_format** right.

 **date_format** settings may include scaped characters as in spanish: "j
 \d\e F \d\e Y"
 and this function using php **str_replace** isn't having in consideration
 that posibility so we end up having: "d \dd\e MM \dd\e yy"

 Expected output should be: "d \d\e MM \d\e yy"

 [https://developer.wordpress.org/reference/functions/wp_localize_jquery_ui_datepicker/
 wp_localize_jquery_ui_datepicker]

 Thanks,

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


More information about the wp-trac mailing list