Title: [246271] trunk/Source/WebInspectorUI
- Revision
- 246271
- Author
- commit-qu...@webkit.org
- Date
- 2019-06-10 12:32:00 -0700 (Mon, 10 Jun 2019)
Log Message
Web Inspector: "Copy Path to Property" doesn't work with multiline keys
https://bugs.webkit.org/show_bug.cgi?id=198691
Patch by Alexey Shvayka <shvaikal...@gmail.com> on 2019-06-10
Reviewed by Matt Baker.
Correctly escape line terminators to prevent doubleQuotedString from returning malformed strings.
* UserInterface/Base/Utilities.js: Use JSON.stringify.
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (246270 => 246271)
--- trunk/Source/WebInspectorUI/ChangeLog 2019-06-10 19:19:16 UTC (rev 246270)
+++ trunk/Source/WebInspectorUI/ChangeLog 2019-06-10 19:32:00 UTC (rev 246271)
@@ -1,3 +1,14 @@
+2019-06-10 Alexey Shvayka <shvaikal...@gmail.com>
+
+ Web Inspector: "Copy Path to Property" doesn't work with multiline keys
+ https://bugs.webkit.org/show_bug.cgi?id=198691
+
+ Reviewed by Matt Baker.
+
+ Correctly escape line terminators to prevent doubleQuotedString from returning malformed strings.
+
+ * UserInterface/Base/Utilities.js: Use JSON.stringify.
+
2019-06-10 Devin Rousso <drou...@apple.com>
Web Inspector: REGRESSION(r246025): prototypes in object previews are visible even when setting `showOnlyJSON`
Modified: trunk/Source/WebInspectorUI/UserInterface/Base/Utilities.js (246270 => 246271)
--- trunk/Source/WebInspectorUI/UserInterface/Base/Utilities.js 2019-06-10 19:19:16 UTC (rev 246270)
+++ trunk/Source/WebInspectorUI/UserInterface/Base/Utilities.js 2019-06-10 19:32:00 UTC (rev 246271)
@@ -1637,7 +1637,7 @@
function doubleQuotedString(str)
{
- return "\"" + str.replace(/\\/g, "\\\\").replace(/"/g, "\\\"") + "\"";
+ return JSON.stringify(str);
}
function insertionIndexForObjectInListSortedByFunction(object, list, comparator, insertionIndexAfter)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes