Changeset 198585 in webkit
- Timestamp:
- Mar 23, 2016, 8:53:52 AM (9 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r198563 r198585 1 2016-03-22 Timothy Hatcher <timothy@apple.com> 2 3 Web Inspector: String double quoting in the console and elsewhere needs to escape backslash too 4 5 https://bugs.webkit.org/show_bug.cgi?id=155752 6 rdar://problem/25293141 7 8 Reviewed by Joseph Pecoraro. 9 10 * UserInterface/Base/Utilities.js: 11 (doubleQuotedString): Escape backslashes too. 12 * UserInterface/Views/FormattedValue.js: 13 (WebInspector.FormattedValue.createLinkifiedElementString): Ditto. 14 1 15 2016-03-22 Joseph Pecoraro <pecoraro@apple.com> 2 16 -
trunk/Source/WebInspectorUI/UserInterface/Base/Utilities.js
r198555 r198585 1199 1199 function doubleQuotedString(str) 1200 1200 { 1201 return "\"" + str.replace(/ "/g, "\\\"") + "\"";1201 return "\"" + str.replace(/\\/g, "\\\\").replace(/"/g, "\\\"") + "\""; 1202 1202 } 1203 1203 -
trunk/Source/WebInspectorUI/UserInterface/Views/FormattedValue.js
r197954 r198585 40 40 var span = document.createElement("span"); 41 41 span.className = "formatted-string"; 42 span.append("\"", WebInspector.linkifyStringAsFragment(string.replace(/ "/g, "\\\"")), "\"");42 span.append("\"", WebInspector.linkifyStringAsFragment(string.replace(/\\/g, "\\\\").replace(/"/g, "\\\"")), "\""); 43 43 return span; 44 44 };
Note:
See TracChangeset
for help on using the changeset viewer.