Opened 23 months ago
Last modified 23 months ago
#6602 new defect (bug)
Comment previews can be inaccurate when they contain back slashes.
Reported by: | 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 :)
Note: See
TracTickets for help on using
tickets.
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)