Skip to content

Commit

Permalink
Merge branch 'release-1.14.0rc10'
Browse files Browse the repository at this point in the history
* release-1.14.0rc10:
  Update version info.
  core: compatible with Firefox 55.*
  trade: fix duplicated folder creation
  core: escapeFileName() now escapes standalone "%"s
  core: fix files with a leading dot loses extension
  • Loading branch information
danny0838 committed Jul 8, 2017
2 parents a1655df + 823c8d3 commit 98eb080
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 6 deletions.
6 changes: 4 additions & 2 deletions chrome/content/scrapbook/trade.js
Original file line number Diff line number Diff line change
Expand Up @@ -551,8 +551,10 @@ var sbImportService = {
if ( this.tarResArray[0] != window.top.sbTreeHandler.TREE.ref ) folder = " [" + item.folder + "] ";
}
var curRes = sbDataSource.addItem(item, this.tarResArray[0], this.tarResArray[1]);
if (item.container || item.type == "folder") sbDataSource.createEmptySeq(curRes.Value);
this.folderTable[item.title] = curRes.Value;
if (item.container || item.type == "folder") {
sbDataSource.createEmptySeq(curRes.Value);
this.folderTable[item.title] = curRes.Value;
}
window.top.sbTreeHandler.TREE.builder.rebuild();
},

Expand Down
7 changes: 7 additions & 0 deletions doc/releases/1.13.11.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Scrapbook X 1.13.11
===================

Changes since v1.13.10
----------------------

* Fixed an issue that fulltext search does not work in Firefox >= 54.
14 changes: 14 additions & 0 deletions doc/releases/1.13.12.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Scrapbook X 1.13.12
===================

Changes since v1.13.11
----------------------

* Fixed an issue that a file named ".foo" be fixed to "foo" and
loses its extension.

* Persent chars ("%") in a filename are now always encoded in URL.

* Fixed an issue that a non-folder item with a same name with a
folder before it causes the import wizard to generated a duplicated
folder.
14 changes: 14 additions & 0 deletions doc/releases/1.14.0rc10.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Scrapbook X 1.14.0rc10
======================

Changes since v1.14.0rc9
------------------------

* Fixed an issue that a file named ".foo" be fixed to "foo" and
loses its extension.

* Persent chars ("%") in a filename are now always encoded in URL.

* Fixed an issue that a non-folder item with a same name with a
folder before it causes the import wizard to generated a duplicated
folder.
4 changes: 2 additions & 2 deletions install.rdf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<Description about="urn:mozilla:install-manifest">
<em:id>[email protected]</em:id>
<em:type>2</em:type>
<em:version>1.14.0rc9</em:version>
<em:version>1.14.0rc10</em:version>
<em:unpack>false</em:unpack>
<em:bootstrap>false</em:bootstrap>
<em:multiprocessCompatible>false</em:multiprocessCompatible>
Expand All @@ -19,7 +19,7 @@
<!-- Firefox -->
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
<em:minVersion>4.0</em:minVersion>
<em:maxVersion>54.*</em:maxVersion>
<em:maxVersion>55.*</em:maxVersion>
</Description>
</em:targetApplication>

Expand Down
4 changes: 2 additions & 2 deletions modules/common.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -904,14 +904,14 @@ var sbCommonUtils = {
escapeFileName: function(aString) {
// " ": breaks srcset
// "#": as the demarcation of main location and hash
return aString.replace(/(?:[ #]|%[0-9A-Fa-f]{2})+/g, function(m){return encodeURIComponent(m);});
return aString.replace(/[ %#]+/g, function(m){return encodeURIComponent(m);});
},

// Tidy chars that may not be valid in a filename on a platform.
// see also: escapeFileName
validateFileName: function(aFileName) {
aFileName = aFileName.replace(/[\x00-\x1F\x7F]+|^ +/g, "");
aFileName = aFileName.replace(/^[. ]+/, "").replace(/[. ]+$/, ""); // leading/trailing spaces and dots are not allowed in Windows
aFileName = aFileName.replace(/^\./, "_.").replace(/^ +/, "").replace(/[. ]+$/, ""); // leading/trailing spaces and dots are not allowed in Windows
aFileName = aFileName.replace(/[\"\?\*\\\/\|\:]/g, "_");
aFileName = aFileName.replace(/[\<]/g, "(");
aFileName = aFileName.replace(/[\>]/g, ")");
Expand Down

0 comments on commit 98eb080

Please sign in to comment.