From 2bf8d6dab0fa685d75f371abee763416b519740a Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sun, 22 Jun 2014 16:41:38 -0400 Subject: Fix YAML single quote escape (use global) The YAML single quote escape wasn't replacing globally so only the first quote in the page title would be escaped. This results in incorrect formatting and YAML files that can't be imported without escaping separately. --- chrome-get-urls-from-tabs-in-windows.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chrome-get-urls-from-tabs-in-windows.js b/chrome-get-urls-from-tabs-in-windows.js index 90682f2..fc1616e 100644 --- a/chrome-get-urls-from-tabs-in-windows.js +++ b/chrome-get-urls-from-tabs-in-windows.js @@ -21,7 +21,7 @@ generate_backup_text = function(callback) { backup_text += "- Window " + w_index + ":\n"; window.tabs.forEach(function(tab){ - backup_text += " - page_title: '" + tab.title.replace('\'', '\'\'') + "'\n"; + backup_text += " - page_title: '" + tab.title.replace(/\'/g, '\'\'') + "'\n"; backup_text += " url: '" + tab.url + "'\n"; }); -- cgit v1.2.3