Closed
Bug 753279
Opened 13 years ago
Closed 13 years ago
Illegal characters should not be copied in the Web Console
Categories
(DevTools :: Console, defect)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: AlexLakatos, Unassigned)
Details
Attachments
(1 file)
|
54 bytes,
text/html
|
Details |
Copying code from a web page that uses ” instead of ", into the Web Console, will copy it. When trying to run that code, you will get a SyntaxError: illegal character. The visual difference is slight, hence you will most likely debug your code for nothing.
Steps to Reproduce:
1.Open the reduced testcase attached to this bug
2.Open the Web Console
3.Copy the text from the page to the Web Console
4.Press Enter
Expected results:
3.The quote generated by ” is replaced with "
0r: 4.You get the result undefined
Actual results:
4.You get a SyntaxError: illegal character
Note: This happens as well for the Scratchpad. Is there a need for a new bug?
Comment 1•13 years ago
|
||
Then how can I test a code such as alert(escape('”'))?
Comment 2•13 years ago
|
||
” and " are not the same characters and I don't think we should magically swap them. It may be the case that there are code samples out there with "fancy quotes" because of overzealous wordpress plugins, but I don't think we want our tools to compensate for code that has been mangled.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → WONTFIX
Updated•7 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•