, 'Yes, you guessed the title. Who is the artist?'
];
- String.prototype.encodeEntities = function() {
- return this.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>');
- };
-
var addCassetteBackdrop = function() {
var html = [
'<div id="touch-backdrop">'
$users.empty();
};
+ var encodeEntities = function(str) {
+ return str.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>');
+ };
+
var gameOver = function(podium) {
var html = [
'<div class="modal-header">'
, splits = text.split(urlregex);
for (var i = 0; i < splits.length; i++) {
- var escapedsplit = splits[i].encodeEntities();
+ var escapedsplit = encodeEntities(splits[i]);
if (urlregex.test(splits[i])) {
html += '<a target="_blank" href="' + escapedsplit + '">' +
return html;
}
- return text.encodeEntities();
+ return encodeEntities(text);
};
// A new player has joined the game