Fix XSS in Skill Swap code

This commit is contained in:
Cathy J. Fitzpatrick 2013-06-08 04:24:29 -06:00
parent 4b6b1cefeb
commit 7e47ac8fc7

View File

@ -4038,10 +4038,10 @@ function Battle(frame, logFrame, noPreload) {
case 'skillswap':
actions += "" + poke.getName() + " swapped Abilities with its target!";
if (ofpoke && poke.side !== ofpoke.side) {
self.resultAnim(poke, args[3], 'neutral', 1);
self.resultAnim(ofpoke, args[4], 'neutral', 4);
actions += "<br />" + poke.getName() + " acquired " + args[3] + "!";
actions += "<br />" + ofpoke.getName() + " acquired " + args[4] + "!";
self.resultAnim(poke, Tools.escapeHTML(args[3]), 'neutral', 1);
self.resultAnim(ofpoke, Tools.escapeHTML(args[4]), 'neutral', 4);
actions += "<br />" + poke.getName() + " acquired " + Tools.escapeHTML(args[3]) + "!";
actions += "<br />" + ofpoke.getName() + " acquired " + Tools.escapeHTML(args[4]) + "!";
}
break;
case 'charge':