From 9f0eb1c01c567d9a36cfaff22d4ca39fd79623f9 Mon Sep 17 00:00:00 2001 From: Luigi Pinca Date: Tue, 5 Apr 2016 18:46:12 +0200 Subject: [PATCH] do not extend `String.prototype` with non-standard methods --- public/js/app.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/public/js/app.js b/public/js/app.js index b5156e8..c5c307c 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -96,10 +96,6 @@ , 'Yes, you guessed the title. Who is the artist?' ]; - String.prototype.encodeEntities = function() { - return this.replace(/&/g, '&').replace(//g, '>'); - }; - var addCassetteBackdrop = function() { var html = [ '
' @@ -540,6 +536,10 @@ $users.empty(); }; + var encodeEntities = function(str) { + return str.replace(/&/g, '&').replace(//g, '>'); + }; + var gameOver = function(podium) { var html = [ '