Escape quotes
This commit is contained in:
parent
dcdc399fea
commit
2c0cc2ec45
|
@ -36,7 +36,7 @@ function updateTab(info) {
|
||||||
title = sym + (info.index + 1) + ' ' + title;
|
title = sym + (info.index + 1) + ' ' + title;
|
||||||
|
|
||||||
chrome.tabs.executeScript(info.id, {
|
chrome.tabs.executeScript(info.id, {
|
||||||
code: "document.title = '" + title + "';"
|
code: "document.title = '" + title.replace(/'/, '\\\'') + "';"
|
||||||
}, function() {
|
}, function() {
|
||||||
if (chrome.runtime.lastError) {
|
if (chrome.runtime.lastError) {
|
||||||
console.error(chrome.runtime.lastError.message);
|
console.error(chrome.runtime.lastError.message);
|
||||||
|
|
Loading…
Reference in New Issue