summaryrefslogtreecommitdiffstats
path: root/jingle
diff options
context:
space:
mode:
Diffstat (limited to 'jingle')
-rw-r--r--jingle/notifier/listener/notification_defines.cc10
1 files changed, 4 insertions, 6 deletions
diff --git a/jingle/notifier/listener/notification_defines.cc b/jingle/notifier/listener/notification_defines.cc
index f7c8f8f..f4f3e40 100644
--- a/jingle/notifier/listener/notification_defines.cc
+++ b/jingle/notifier/listener/notification_defines.cc
@@ -65,12 +65,10 @@ bool Notification::Equals(const Notification& other) const {
}
std::string Notification::ToString() const {
- // |channel| or |data| could hold binary data, so convert all non-ASCII
- // characters to escape sequences.
- const std::string& printable_channel =
- base::EscapeBytesAsInvalidJSONString(channel, true /* put_in_quotes */);
- const std::string& printable_data =
- base::EscapeBytesAsInvalidJSONString(data, true /* put_in_quotes */);
+ // |channel| or |data| could hold binary data, so use GetDoubleQuotedJson()
+ // to escape them.
+ const std::string& printable_channel = base::GetDoubleQuotedJson(channel);
+ const std::string& printable_data = base::GetDoubleQuotedJson(data);
return
"{ channel: " + printable_channel + ", data: " + printable_data + " }";
}