[Pkg-mozext-commits] [itsalltext] 443/459: Include the full path part of the URL in a file name.
David Prévot
taffit at moszumanska.debian.org
Tue Feb 24 23:26:46 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository itsalltext.
commit ac37d34aa8b0a7bb233c89899e8c69d453dcb92a
Author: Akinori MUSHA <knu at idaemons.org>
Date: Fri Apr 4 21:12:04 2014 +0900
Include the full path part of the URL in a file name.
A host part is sometimes not enough to guess a proper major mode for
editing the text.
---
src/chrome/content/cacheobj.js | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/chrome/content/cacheobj.js b/src/chrome/content/cacheobj.js
index 23a23dd..7d8c1be 100644
--- a/src/chrome/content/cacheobj.js
+++ b/src/chrome/content/cacheobj.js
@@ -27,7 +27,7 @@ function CacheObj(node) {
var that = this,
hitch_re = /^hitched_/,
doc = node.ownerDocument,
- host,
+ basename,
hash,
method,
extension;
@@ -79,7 +79,6 @@ function CacheObj(node) {
/* Figure out where we will store the file. While the filename can
* change, the directory that the file is stored in should not!
*/
- host = window.escape(doc.location.hostname);
hash = itsalltext.hashString(
[ doc.location.protocol,
doc.location.port,
@@ -87,7 +86,8 @@ function CacheObj(node) {
doc.location.pathname,
that.node_id].join(':')
);
- that.base_filename = [host, hash.slice(0, 10)].join('.');
+ basename = window.encodeURIComponent(doc.location.host + doc.location.pathname);
+ that.base_filename = [basename, hash.slice(0, 10)].join('.');
/* The current extension.
* @type String
*/
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/itsalltext.git
More information about the Pkg-mozext-commits
mailing list