Quellcode durchsuchen

added "+" in the list of replaced characters

Former-commit-id: df3461eafe8b4135dc3303d69df43ce6514b156d
Gildas vor 6 Jahren
Ursprung
Commit
76388717ac
3 geänderte Dateien mit 5 neuen und 5 gelöschten Zeilen
  1. 1 1
      README.MD
  2. 3 3
      extension/ui/pages/help.html
  3. 1 1
      lib/single-file/single-file-util.js

+ 1 - 1
README.MD

@@ -68,7 +68,7 @@ See https://addons.mozilla.org/firefox/addon/single-file/versions/
   - For security reasons, you cannot save pages hosted on https://chrome.google.com, https://addons.mozilla.org and some other Mozilla domains. When this happens, 🛇 is displayed on top of the SingleFile icon.
   - For [security reasons](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image), SingleFile is sometimes unable to save the image representation of [canvas](https://developer.mozilla.org/docs/Web/HTML/Element/canvas) and snapshots of [video](https://developer.mozilla.org/docs/Web/HTML/Element/video) elements.
   - The last saved path cannot be remembered by default. To circumvent this limitation, disable the option "Misc > save pages in background".
-  - The following characters are replaced with `_` in file names: `~`, `\`, `?`, `%`, `*`, `:`, `"`, `<`, `>`  
+  - The following characters are replaced with `_` in file names: `~`, `+`, `\`, `?`, `%`, `*`, `:`, `"`, `<`, `>`  
 - Chrome:
   - You must enable the option "Allow access to file URLs" in the extension page to display the infobar when viewing a saved page, or to save a page stored on the filesystem.
   - If the file name of a saved page looks like "56833935-156b-4d8c-a00f-19599c6513d3.html", disable the option "Misc > save pages in background". Reinstalling the browser may also fix this issue.

+ 3 - 3
extension/ui/pages/help.html

@@ -151,7 +151,7 @@
 							the template.</p>
 						<p>Invalid characters are automatically transformed and collapsed to underscores. File names
 							cannot exceed 192 characters and are truncated if longer. The invalid characters are:
-							<code>[</code> <code>~</code> <code>\</code> <code>?</code> <code>%</code>
+							<code>[</code> <code>~</code> <code>+</code> <code>\</code> <code>?</code> <code>%</code>
 							<code>*</code> <code>:</code> <code>|</code> <code>"</code> <code>&lt;</code>
 							<code>&gt;</code> and control characters from 0 to 31 in the ASCII table.</p>
 						<p>Template examples:</p>
@@ -459,8 +459,8 @@
 								canvas element.</li>
 							<li>The last saved path cannot be remembered by default. To circumvent this limitation,
 								disable the option "Misc. &gt; Save pages in background".</li>
-							<li>The following characters are replaced with _ in filenames: ~, \, ?, %, *, :, |, ", &lt;,
-								&gt;</li>
+							<li>The following characters are replaced with _ in filenames: ~, +, \, ?, %, *, :, |, ",
+								&lt;, &gt;</li>
 						</ul>
 					</li>
 					<li>Chrome/Opera <ul>

+ 1 - 1
lib/single-file/single-file-util.js

@@ -28,7 +28,7 @@ this.singlefile.lib.util = this.singlefile.lib.util || (() => {
 	const DEBUG = false;
 	const ONE_MB = 1024 * 1024;
 	const PREFIX_CONTENT_TYPE_TEXT = "text/";
-	const DEFAULT_REPLACED_CHARACTERS = ["~", "\\\\", "?", "%", "*", ":", "|", "\"", "<", ">", "\x00-\x1f", "\x7F"];
+	const DEFAULT_REPLACED_CHARACTERS = ["~", "+", "\\\\", "?", "%", "*", ":", "|", "\"", "<", ">", "\x00-\x1f", "\x7F"];
 
 	const URL = window.URL;
 	const DOMParser = window.DOMParser;