Skip to content

Commit

Permalink
Merge r222762 - Web Inspector: Escape more characters in posix string…
Browse files Browse the repository at this point in the history
… conversion

https://bugs.webkit.org/show_bug.cgi?id=177761
<rdar://problem/34506832>

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-10-02
Reviewed by Brian Burg.

* UserInterface/Models/Resource.js:
(WI.Resource.prototype.generateCURLCommand.escapeStringPosix):
Escape '!' to '\041' in posix strings ($'...') since '!' may have special behavior at times.
  • Loading branch information
JosephPecoraro authored and carlosgcampos committed Jan 24, 2018
1 parent c73e642 commit 709b9ed
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Source/WebInspectorUI/ChangeLog
@@ -1,3 +1,15 @@
2017-10-02 Joseph Pecoraro <pecoraro@apple.com>

Web Inspector: Escape more characters in posix string conversion
https://bugs.webkit.org/show_bug.cgi?id=177761
<rdar://problem/34506832>

Reviewed by Brian Burg.

* UserInterface/Models/Resource.js:
(WI.Resource.prototype.generateCURLCommand.escapeStringPosix):
Escape '!' to '\041' in posix strings ($'...') since '!' may have special behavior at times.

2017-09-08 Joseph Pecoraro <pecoraro@apple.com>

Uncaught Exception: TypeError: this._heapSnapshot.addEventListener is not a function.
Expand Down
1 change: 1 addition & 0 deletions Source/WebInspectorUI/UserInterface/Models/Resource.js
Expand Up @@ -949,6 +949,7 @@ WI.Resource = class Resource extends WI.SourceCode
.replace(/'/g, "\\'")
.replace(/\n/g, "\\n")
.replace(/\r/g, "\\r")
.replace(/!/g, "\\041")
.replace(/[^\x20-\x7E]/g, escapeCharacter) + "'";
} else {
// Use single quote syntax.
Expand Down

0 comments on commit 709b9ed

Please sign in to comment.