Skip to content
Extraits de code Groupes Projets
Valider 97f3d5ea rédigé par cerdic's avatar cerdic
Parcourir les fichiers

Mise a jour de jQuery forms en version 4.3.0 + fix issue 464 / PR 586

parent fffff984
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -262,6 +262,12 @@ ...@@ -262,6 +262,12 @@
var successArguments = arguments, var successArguments = arguments,
fn = options.replaceTarget ? 'replaceWith' : 'html'; fn = options.replaceTarget ? 'replaceWith' : 'html';
// Validate `data` through `HTML encoding` when passed `data` is passed
// to `html()`, as suggested in https://github.com/jquery-form/form/issues/464
if (fn == 'html' ) {
data = $.parseHTML($("<div>").text(data).html())
};
$(options.target)[fn](data).each(function(){ $(options.target)[fn](data).each(function(){
oldSuccess.apply(this, successArguments); oldSuccess.apply(this, successArguments);
}); });
...@@ -923,8 +929,11 @@ ...@@ -923,8 +929,11 @@
return (doc && doc.documentElement && doc.documentElement.nodeName !== 'parsererror') ? doc : null; return (doc && doc.documentElement && doc.documentElement.nodeName !== 'parsererror') ? doc : null;
}; };
var parseJSON = $.parseJSON || function(s) { var parseJSON = $.parseJSON || function(s) {
/* jslint evil:true */ // Arise an error resolvable including jquery instead of
return window['eval']('(' + s + ')'); // eslint-disable-line dot-notation // making a new function using unsanitized inputs
window.console.error('jquery.parseJSON is undefined');
return null;
}; };
var httpData = function(xhr, type, s) { // mostly lifted from jq1.4.4 var httpData = function(xhr, type, s) { // mostly lifted from jq1.4.4
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter