Opened 10 years ago

Closed 10 years ago

#10093 closed defect (fixed)

backslashes doubled

Reported by: bill Owned by: Shane O'Sullivan
Priority: high Milestone: 1.4
Component: CheckStyle Version: 1.4.0b
Keywords: Cc:
Blocked By: Blocking:

Description

In files like _RichText.js, the style correction will convert \ into
,
into

, etc.

Change History (5)

comment:1 Changed 10 years ago by Shane O'Sullivan

Status: newassigned

comment:2 Changed 10 years ago by Shane O'Sullivan

I can not replicate this issue on the latest code. Can you please retest, and close this ticket if it is no longer a problem?

comment:3 Changed 10 years ago by bill

I just grabbed the latest code. Here's what I did:

  1. run "sh checkstyle.sh"
  2. open checkstyleReport.html
  3. click dijit/_editor in left hand column
  4. click first "Richtext.js" entry in right grid
  5. click "make fixes" button
  6. click "save" button

Now comparing _Richtext.js to _Richtext.js.checkstyle.js:

old:

"\\": exec("insertunorderedlist")

vs. new:

"\\\\": exec("insertunorderedlist")

And so on.

This was running on mac, and using safari, although I doubt that makes a difference.

This was running against RichText.js [20573], I'm about to check in some fixes to that file that may affect the results so you should try running against that version.

comment:4 Changed 10 years ago by Shane O'Sullivan

(In [20595]) Refs #10093 Fixes the issue where the Checkstyle tool failed to correctly handle backslashes in front of quotes and double quotes. This was caused by the PHP file used to save modified JavaScript? files, which had code that manipulated the file contents to remove unnecessary backslashes. The solution is to use the stripslashes() PHP function instead.

comment:5 Changed 10 years ago by Shane O'Sullivan

Milestone: tbd1.4
Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.