Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion modules/xmpp/xmpp.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { safeJsonParse } from '@jitsi/js-utils/json';
import { getLogger } from '@jitsi/logger';
import $ from 'jquery';
import { unescape } from 'lodash-es';
import { $msg, Strophe } from 'strophe.js';
import 'strophejs-plugin-disco';

Expand Down Expand Up @@ -1019,7 +1020,9 @@ export default class XMPP extends Listenable {
}

try {
const json = safeJsonParse(jsonString);
// Note: we use `unescape` to also convert HTML entities to UTF-8 since
// Jigasi seems to encode them like that in some circumstances.
const json = safeJsonParse(unescape(jsonString));

// Handle non-exception-throwing cases:
// Neither JSON.parse(false) or JSON.parse(1234) throw errors,
Expand Down
Loading