WordPress.org

Make WordPress Core

Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#42181 closed defect (bug) (duplicate)

esc_js must escape U+2028 and U+2029

Reported by: johanee Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.8
Component: Formatting Keywords:
Focuses: Cc:
PR Number:

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

Change History (2)

#1 @johanee
2 years ago

  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #42182.

#2 @SergeyBiryukov
2 years ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.