Make WordPress Core

Opened 6 years ago

Last modified 6 years ago

#42182 new defect (bug)

esc_js must escape U+2028 and U+2029

Reported by: johanee's profile johanee Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.8
Component: Formatting Keywords: has-patch
Focuses: Cc:

Description

JS considers U+2028 (line separator) and U+2029 (paragraph separator) as line terminators, so they must be escaped to not break inline JS.

See:
https://www.ecma-international.org/ecma-262/5.1/#sec-7.3

Attachments (1)

wp-esc-js-handle-unicode-breaks.diff (686 bytes) - added by johanee 6 years ago.

Download all attachments as: .zip

Change History (3)

#1 @johanee
6 years ago

#42181 was marked as a duplicate.

#2 @johanee
6 years ago

  • Keywords has-patch added
Note: See TracTickets for help on using tickets.