o2-timestamp doesn't support PHP escaped characters.
dd32 opened this issue · 0 comments
dd32 commented
As reported in https://meta.trac.wordpress.org/ticket/7056 o2 doesn't properly handle escaped characters in the date_format
.
@dd32:
It seems this is coming from thedate_format
being set toj \d\e F \d\e Y
(This is likely coming from a GlotPress translated string)That's then escaped to
"dateFormat":"j \\d\\e F \\d\\e Y"
when output as part ofo2
settings, and it's then converted over to Moment.js date format in https://github.com/Automattic/o2/blob/master/js/utils/timestamp.jsIt looks like the above o2 code doesn't handle escaped characters.