Make WordPress Core

Opened 13 months ago

Last modified 13 months ago

#57955 new defect (bug)

wp_localize_jquery_ui_datepicker parsing general settings date_format wrong

Reported by: naamb's profile naamb Owned by:
Milestone: Awaiting Review Priority: normal
Severity: minor Version: 6.1.1
Component: Date/Time Keywords: changes-requested
Focuses: Cc:

Description

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"

wp_localize_jquery_ui_datepicker

Thanks,

Change History (1)

#1 @Rarst
13 months ago

wp_date() has the latest iteration of date format parser/replacer and is thoroughly unit tested, should be a good basis to adapt for this, if someone wants to take a stab at it.

Note: See TracTickets for help on using tickets.