Making WordPress.org

Opened 17 months ago

Last modified 17 months ago

#6602 new defect (bug)

Comment previews can be inaccurate when they contain back slashes.

Reported by: peterwilsoncc's profile peterwilsoncc Owned by:
Milestone: Priority: low
Component: Make (Get Involved) / P2 Keywords:
Cc:

Description

On make/core I needed to leave a comment containing some regex: /\*{1}\n.

When viewing the comment using the preview tab, the above was displaying as /*{1}n, for the preview to display the code correctly I modified it to /\\*{1}\\n.

When submitting the comment, the comment was rendered as entered with the double back slashes.

I suspect it's a JavaScript escaping issue when rendering the preview. I was wrapping the regex in <code> tags in case that makes a difference -- while testing it doesn't seem to.

(Aside: I know the {1} isn't required but I was including it to make a distinction :)

Change History (1)

#1 @dd32
17 months ago

  • Priority changed from normal to low

This sounds like a problem in the upstream https://github.com/Automattic/o2

I'm bumping the priority down as it's unlikely we'll spend time to track it down, but if someone does, happy to merge it upstream (or on WordPress.org, where-ever the problem lives)

Note: See TracTickets for help on using tickets.