diff --git a/js/battle.js b/js/battle.js
index a6b4c982c..77d395854 100644
--- a/js/battle.js
+++ b/js/battle.js
@@ -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 += "
" + poke.getName() + " acquired " + args[3] + "!";
- actions += "
" + ofpoke.getName() + " acquired " + args[4] + "!";
+ self.resultAnim(poke, Tools.escapeHTML(args[3]), 'neutral', 1);
+ self.resultAnim(ofpoke, Tools.escapeHTML(args[4]), 'neutral', 4);
+ actions += "
" + poke.getName() + " acquired " + Tools.escapeHTML(args[3]) + "!";
+ actions += "
" + ofpoke.getName() + " acquired " + Tools.escapeHTML(args[4]) + "!";
}
break;
case 'charge':