From 2c0cc2ec45907eb5dd242718dc1eea59b2fc9670 Mon Sep 17 00:00:00 2001 From: Gregory Eremin Date: Mon, 22 Sep 2014 14:22:54 +0400 Subject: [PATCH] Escape quotes --- background.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/background.js b/background.js index fc56ec1..0acfd5e 100644 --- a/background.js +++ b/background.js @@ -36,7 +36,7 @@ function updateTab(info) { title = sym + (info.index + 1) + ' ' + title; chrome.tabs.executeScript(info.id, { - code: "document.title = '" + title + "';" + code: "document.title = '" + title.replace(/'/, '\\\'') + "';" }, function() { if (chrome.runtime.lastError) { console.error(chrome.runtime.lastError.message);