aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2014-06-22 16:41:38 -0400
committerTeddy Wing2014-06-22 16:41:38 -0400
commit2bf8d6dab0fa685d75f371abee763416b519740a (patch)
tree31ba230965151c3f604cfca517c19985fbfc7ed4
parent35c36bf6146e7d537690ea8c8dc48427aff46e99 (diff)
downloadchrome-copy-urls-from-all-tabs-2bf8d6dab0fa685d75f371abee763416b519740a.tar.bz2
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.
-rw-r--r--chrome-get-urls-from-tabs-in-windows.js2
1 files changed, 1 insertions, 1 deletions
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";
});