Ensure we properly escape data from Select2 controls. Fixes #1292

This commit is contained in:
Sanket Mehta 2016-06-20 16:04:09 +01:00 committed by Dave Page
parent 3f25e9331f
commit f4e76a22b9

View File

@ -1787,7 +1787,7 @@
var Select2Formatter = function() {};
_.extend(Select2Formatter.prototype, {
fromRaw: function(rawData, model) {
return JSON.stringify(_.escape(rawData));
return JSON.parse(JSON.stringify(_.escape(rawData)));
},
toRaw: function(formattedData, model) {
return formattedData;