[Slogger] Patch to add $escapedUrl
Rory McCann
ebelular at gmail.com
Sat May 6 01:17:36 EDT 2006
Hi *,
In light of my previous mail about $url containing '/', I've hacked on
the slogger source and added a $escapedUrl variable. It is $url but
with all occurance of '/' replaced with '\/'. I use $escapedUrl as
part of the filename. Change line 984 in slogger.js to comment out
other characters.
I'm new to sending patches, so I don't know if this is correct, here
is the patch:
---BEGIN PATCH---
diff -rN -u old-slogger/chrome/content/slogger.js
new-slogger/chrome/content/slogger.js
--- old-slogger/chrome/content/slogger.js 2006-05-06
00:11:35.000000000 +0100
+++ new-slogger/chrome/content/slogger.js 2006-05-06
00:11:35.000000000 +0100
@@ -983,8 +980,11 @@
// "htmlfile","",
// "datadir","",
+ eURL = aURL.replace(/\//g, '\\\/');
+
sloggerSetVar(
"url",aURL,
+ "escapedUrl", eURL,
"filename",filename,
"title",title,
"host",host,
diff -rN -u old-slogger/chrome/content/sloggerPrefs.js
new-slogger/chrome/content/sloggerPrefs.js
--- old-slogger/chrome/content/sloggerPrefs.js 2006-05-06
00:11:35.000000000 +0100
+++ new-slogger/chrome/content/sloggerPrefs.js 2006-05-06
00:11:35.000000000 +0100
@@ -61,6 +61,7 @@
["url", "Char", 0, "", "URL of page being saved"],
+ ["escapedUrl", "Char", 0, "", "Escaped URL of
the page being saved"],
["filename", "Char", 0, "", "Original file
name of page being saved (from url)"],
["title", "Char", 0, "", "Title of
original page, if exists (ie html title)"],
---END PATCH--
More information about the Slogger
mailing list