Opened 20 months ago

Last modified 20 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:


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
20 months ago

  • Priority changed from normal to low

This sounds like a problem in the upstream

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, where-ever the problem lives)

Note: See TracTickets for help on using tickets.