Skip to content

Commit

Permalink
Editorial: spell filename as a single word
Browse files Browse the repository at this point in the history
  • Loading branch information
annevk authored Mar 1, 2021
1 parent 3ffa1ba commit ea67bde
Showing 1 changed file with 49 additions and 49 deletions.
98 changes: 49 additions & 49 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -21673,7 +21673,7 @@ interface <dfn>HTMLTimeElement</dfn> : <span>HTMLElement</span> {
</dl>

<p>The <code>code</code> element <span>represents</span> a fragment of computer code. This could
be an XML element name, a file name, a computer program, or any other string that a computer would
be an XML element name, a filename, a computer program, or any other string that a computer would
recognize.</p>

<p>There is no formal way to indicate the language of computer code being marked up. Authors who
Expand Down Expand Up @@ -22858,10 +22858,10 @@ document.body.appendChild(wbr);</code></pre>
<p>The <dfn element-attr for="a,area"><code data-x="attr-hyperlink-download">download</code></dfn>
attribute, if present, indicates that the author intends the hyperlink to be used for <span
data-x="downloading hyperlinks">downloading a resource</span>. The attribute may have a value; the
value, if any, specifies the default file name that the author recommends for use in labeling the
value, if any, specifies the default filename that the author recommends for use in labeling the
resource in a local file system. There are no restrictions on allowed values, but authors are
cautioned that most file systems have limitations with regard to what punctuation is supported in
file names, and user agents are likely to adjust file names accordingly.</p>
filenames, and user agents are likely to adjust filenames accordingly.</p>


<p>The <dfn id="ping" data-x="attr-hyperlink-ping"><code>ping</code></dfn> attribute, if present,
Expand Down Expand Up @@ -23551,7 +23551,7 @@ document.body.appendChild(wbr);</code></pre>
<code>a</code> or <code>area</code> element that creates the <span>hyperlink</span> to that
resource.</p>

<p>The attribute can furthermore be given a value, to specify the file name that user agents are
<p>The attribute can furthermore be given a value, to specify the filename that user agents are
to use when storing the resource in a file system. This value can be overridden by the `<code
data-x="http-content-disposition">Content-Disposition</code>` HTTP header's filename parameters.
<ref spec=RFC6266></p>
Expand Down Expand Up @@ -23632,7 +23632,7 @@ document.body.appendChild(wbr);</code></pre>
successfully obtained. Otherwise, it should report any problems downloading the file to the
user.</p>

<p>If the user agent needs a file name for a resource being handled <span>as a download</span>, it
<p>If the user agent needs a filename for a resource being handled <span>as a download</span>, it
should select one using the following algorithm.</p>

<p class="warning">This algorithm is intended to mitigate security dangers involved in downloading
Expand All @@ -23645,8 +23645,8 @@ document.body.appendChild(wbr);</code></pre>
<!-- Content-Disposition: attachment; filename="" is always honoured, even cross-origin -->
<li><p>If the resource has a `<code data-x="http-content-disposition">Content-Disposition</code>`
header, that header specifies the <code data-x="">attachment</code> disposition type, and the
header includes file name information, then let <var>filename</var> have the value
specified by the header, and jump to the step labeled <i>sanitize</i> below. <ref spec=RFC6266></p></li>
header includes filename information, then let <var>filename</var> have the value specified by
the header, and jump to the step labeled <i>sanitize</i> below. <ref spec=RFC6266></p></li>

<li><p>Let <var>interface origin</var> be the <span
data-x="concept-document-origin">origin</span> of the <code>Document</code> in which the <span
Expand All @@ -23664,16 +23664,16 @@ document.body.appendChild(wbr);</code></pre>

<!-- Content-Disposition: *; filename="" overrides download="" for same-origin -->
<li><p>If <var>trusted operation</var> is true and the resource has a `<code
data-x="http-content-disposition">Content-Disposition</code>` header and that header includes file
name information, then let <var>filename</var> have the value specified by the header,
and jump to the step labeled <i>sanitize</i> below. <ref spec=RFC6266></p></li>
data-x="http-content-disposition">Content-Disposition</code>` header and that header includes
filename information, then let <var>filename</var> have the value specified by the header, and
jump to the step labeled <i>sanitize</i> below. <ref spec=RFC6266></p></li>

<li><p>If the download was not initiated from a <span>hyperlink</span> created by an
<code>a</code> or <code>area</code> element, or if the element of the <span>hyperlink</span> from
which it was initiated did not have a <code data-x="attr-hyperlink-download">download</code>
attribute when the download was initiated, or if there was such an attribute but its value when
the download was initiated was the empty string, then jump to the step labeled <i>no proposed
file name</i>.</p></li>
filename</i>.</p></li>

<li><p>Let <var>proposed filename</var> have the value of the <code
data-x="attr-hyperlink-download">download</code> attribute of the element of the
Expand All @@ -23692,16 +23692,16 @@ document.body.appendChild(wbr);</code></pre>
header and that header specifies the <code data-x="">attachment</code> disposition type, let <var>filename</var> have the value of <var>proposed filename</var>, and jump to the
step labeled <i>sanitize</i> below. <ref spec=RFC6266></p></li>

<!-- fallback for same-origin resources or explicit downloads: use the resource's file name -->
<li><p><i>No proposed file name</i>: If <var>trusted operation</var> is true, or if the
<!-- fallback for same-origin resources or explicit downloads: use the resource's filename -->
<li><p><i>No proposed filename</i>: If <var>trusted operation</var> is true, or if the
user indicated a preference for having the resource in question downloaded, let
<var>filename</var> have a value derived from the <span>URL</span> of the resource in an
<span>implementation-defined</span> manner, and jump to the step labeled <i>sanitize</i> below.</p></li>

<!-- no C-D: a header on cross-origin raises red flags -->
<li>
<p>Let <var>filename</var> be set to the user's preferred file name or to a file name selected
by the user agent, and jump to the step labeled <i>sanitize</i> below.</p>
<p>Let <var>filename</var> be set to the user's preferred filename or to a filename selected by
the user agent, and jump to the step labeled <i>sanitize</i> below.</p>

<div class="warning">

Expand All @@ -23716,26 +23716,26 @@ document.body.appendChild(wbr);</code></pre>
by tricking the user into thinking the data is from the hostile server.</p>

<p>Thus, it is in the user's interests that the user be somehow notified that the resource in
question comes from quite a different source, and to prevent confusion, any suggested file name
question comes from quite a different source, and to prevent confusion, any suggested filename
from the potentially hostile <var>interface origin</var> should be ignored.</p>

</div>
</li>

<li><p><i>Sanitize</i>: Optionally, allow the user to influence <var>filename</var>. For
example, a user agent could prompt the user for a file name, potentially providing the value of
example, a user agent could prompt the user for a filename, potentially providing the value of
<var>filename</var> as determined above as a default value.</p></li>

<li>
<p>Adjust <var>filename</var> to be suitable for the local file system.</p>

<p class="example">For example, this could involve removing characters that are not legal in
file names, or trimming leading and trailing whitespace.</p>
filenames, or trimming leading and trailing whitespace.</p>
</li>

<li><p>If the platform conventions do not in any way use <span
data-x="concept-extension">extensions</span> to determine the types of file on the file system,
then return <var>filename</var> as the file name.</p></li>
then return <var>filename</var> as the filename.</p></li>

<li><p>Let <var>claimed type</var> be the type given by the resource's <span
data-x="Content-Type">Content-Type metadata</span>, if any is known. Let <var>named
Expand All @@ -23744,14 +23744,14 @@ document.body.appendChild(wbr);</code></pre>
<i>type</i> is a mapping of a <span>MIME type</span> to an <span
data-x="concept-extension">extension</span>.</p></li>

<li><p>If <var>named type</var> is consistent with the user's preferences (e.g. because
the value of <var>filename</var> was determined by prompting the user), then return <var>filename</var> as the file name.</p></li>
<li><p>If <var>named type</var> is consistent with the user's preferences (e.g., because the
value of <var>filename</var> was determined by prompting the user), then return
<var>filename</var> as the filename.</p></li>

<li><p>If <var>claimed type</var> and <var>named type</var> are the same type
(i.e. the type given by the resource's <span data-x="Content-Type">Content-Type metadata</span> is
consistent with the type given by <var>filename</var>'s <span
data-x="concept-extension">extension</span>), then return <var>filename</var> as the file
name.</p></li>
<li><p>If <var>claimed type</var> and <var>named type</var> are the same type (i.e., the type
given by the resource's <span data-x="Content-Type">Content-Type metadata</span> is consistent
with the type given by <var>filename</var>'s <span data-x="concept-extension">extension</span>),
then return <var>filename</var> as the filename.</p></li>

<li>
<p>If the <var>claimed type</var> is known, then alter <var>filename</var> to
Expand All @@ -23768,14 +23768,14 @@ document.body.appendChild(wbr);</code></pre>
matter.</p>
</li>

<li><p>Return <var>filename</var> as the file name.</p></li>
<li><p>Return <var>filename</var> as the filename.</p></li>
</ol>

<p>For the purposes of this algorithm, a file <dfn data-x="concept-extension">extension</dfn>
consists of any part of the file name that platform conventions dictate will be used for
identifying the type of the file. For example, many operating systems use the part of the file
name following the last dot ("<code data-x="">.</code>") in the file name to determine the type of
the file, and from that the manner in which the file is to be opened or executed.</p>
consists of any part of the filename that platform conventions dictate will be used for
identifying the type of the file. For example, many operating systems use the part of the filename
following the last dot ("<code data-x="">.</code>") in the filename to determine the type of the
file, and from that the manner in which the file is to be opened or executed.</p>

<p>User agents should ignore any directory or path information provided by the resource itself,
its <span>URL</span>, and any <code data-x="attr-hyperlink-download">download</code> attribute, in
Expand Down Expand Up @@ -29929,7 +29929,7 @@ href="?audio">audio&lt;/a> test instead.)&lt;/p></code></pre>
egregious error of providing phony alternative text, because state-of-the-art automated
conformance checkers cannot distinguish phony alternative text from correct alternative text.</p>

<p>Markup generators should generally avoid using the image's own file name as the alternative
<p>Markup generators should generally avoid using the image's own filename as the alternative
text. Similarly, markup generators should avoid generating alternative text from any content that
will be equally available to presentation user agents (e.g., web browsers).</p>

Expand Down Expand Up @@ -43792,7 +43792,7 @@ interface <dfn>HTMLInputElement</dfn> : <span>HTMLElement</span> {
<tr>
<td> <dfn><code data-x="attr-input-type-file-keyword">file</code></dfn>
<td> <span data-x="attr-input-type-file">File Upload</span>
<td> Zero or more files each with a <span>MIME type</span> and optionally a file name
<td> Zero or more files each with a <span>MIME type</span> and optionally a filename
<td> A label and a button
<tr>
<td> <dfn><code data-x="attr-input-type-submit-keyword">submit</code></dfn>
Expand Down Expand Up @@ -47618,16 +47618,16 @@ ldh-str = &lt; as defined in <a href="https://tools.ietf.org/html/rfc1034#
</div>

<p>The <code>input</code> element <span>represents</span> a list of <dfn
data-x="concept-input-type-file-selected">selected files</dfn>, each file consisting of a file
name, a file type, and a file body (the contents of the file).</p>
data-x="concept-input-type-file-selected">selected files</dfn>, each file consisting of a
filename, a file type, and a file body (the contents of the file).</p>

<div w-nodev>

<p>File names must not contain <span data-x="concept-input-file-path">path components</span>, even
<p>Filenames must not contain <span data-x="concept-input-file-path">path components</span>, even
in the case that a user has selected an entire directory hierarchy or multiple files with the same
name from different directories. <dfn data-x="concept-input-file-path">Path components</dfn>, for
the purposes of the <span data-x="attr-input-type-file">File Upload</span> state, are those parts
of file names that are separated by U+005C REVERSE SOLIDUS character (\) characters.</p>
of filenames that are separated by U+005C REVERSE SOLIDUS character (\) characters.</p>

<p>Unless the <code data-x="attr-input-multiple">multiple</code> attribute is set, there must be
no more than one file in the list of <span data-x="concept-input-type-file-selected">selected
Expand Down Expand Up @@ -47759,7 +47759,7 @@ ldh-str = &lt; as defined in <a href="https://tools.ietf.org/html/rfc1034#
<p>On platforms that only use file extensions to describe file types, the extensions listed here
can be used to filter the allowed documents, while the MIME types can be used with the system's
type registration table (mapping MIME types to extensions used by the system), if any, to
determine any other extensions to allow. Similarly, on a system that does not have file names or
determine any other extensions to allow. Similarly, on a system that does not have filenames or
extensions but labels documents with MIME types internally, the MIME types can be used to pick
the allowed files, while the extensions can be used if the system has an extension registration
table that maps known extensions to MIME types used by the system.</p>
Expand All @@ -47778,10 +47778,10 @@ ldh-str = &lt; as defined in <a href="https://tools.ietf.org/html/rfc1034#
<div class="example" id="fakepath-srsly">

<p>For historical reasons, the <code data-x="dom-input-value">value</code> IDL attribute prefixes
the file name with the string "<code data-x="">C:\fakepath\</code>". Some legacy user agents
the filename with the string "<code data-x="">C:\fakepath\</code>". Some legacy user agents
actually included the full path (which was a security vulnerability). As a result of this,
obtaining the file name from the <code data-x="dom-input-value">value</code> IDL attribute in a
backwards-compatible way is non-trivial. The following function extracts the file name in a
obtaining the filename from the <code data-x="dom-input-value">value</code> IDL attribute in a
backwards-compatible way is non-trivial. The following function extracts the filename in a
suitably compatible manner:</p>

<pre><code class="js">function extractFilename(path) {
Expand All @@ -47794,7 +47794,7 @@ ldh-str = &lt; as defined in <a href="https://tools.ietf.org/html/rfc1034#
x = path.lastIndexOf('\\');
if (x >= 0) // Windows-based path
return path.substr(x+1);
return path; // just the file name
return path; // just the filename
}</code></pre>

<p>This can be used as follows:</p>
Expand Down Expand Up @@ -49459,7 +49459,7 @@ You cannot submit this form when the field is incorrect.</samp></pre>
information.</p>

<p class="note">Since <span data-x="concept-input-file-path">path components</span> are not
permitted in file names in the list of <span data-x="concept-input-type-file-selected">selected
permitted in filenames in the list of <span data-x="concept-input-type-file-selected">selected
files</span>, the "\fakepath\" cannot be mistaken for a path component.</p>
</dd>
</dl>
Expand Down Expand Up @@ -56692,12 +56692,12 @@ fur
<li><p>The order of parts must be the same as the order of fields in <var>entry list</var>.
Multiple entries with the same name must be treated as distinct fields.</p></li>

<li><p>Field names, field values for non-file fields, and file names for file fields, in the
<li><p>Field names, field values for non-file fields, and filenames for file fields, in the
generated <code>multipart/form-data</code> resource must be set to the result of <span
data-x="encode">encoding</span> the corresponding entry's name or value with
<var>encoding</var>, converted to a byte sequence.</p></li>

<li><p>For field names and file names for file fields, the result of the encoding in the
<li><p>For field names and filenames for file fields, the result of the encoding in the
previous bullet point must be escaped by replacing any 0x0A (LF) bytes with the byte sequence
`<code data-x="">%0A</code>`, 0x0D (CR) with `<code data-x="">%0D</code>` and 0x22 (") with
`<code data-x="">%22</code>`. The user agent must not perform any other escapes.</p></li>
Expand Down Expand Up @@ -75611,7 +75611,7 @@ body { display:none }

<dt><i>File</i></dt>
<dd>
<p>Binary data with a file name.</p>
<p>Binary data with a filename.</p>
</dd>

<!-- DND-v4:
Expand Down Expand Up @@ -75639,7 +75639,7 @@ body { display:none }

<dt>The actual data</dt>

<dd><p>A Unicode or binary string, in some cases with a file name (itself a Unicode string),
<dd><p>A Unicode or binary string, in some cases with a filename (itself a Unicode string),
<!-- (DND-v4:) or an object, --> as per <span>the drag data item kind</span>.</p></dd>
</dl>

Expand Down Expand Up @@ -114678,7 +114678,7 @@ details[open] > summary {
<p>An <code>input</code> element whose <code data-x="attr-input-type">type</code> attribute is in
the <span data-x="attr-input-type-file">File Upload</span> state, when it generates a <span>CSS
box</span>, is expected to render as an <span>'inline-block'</span> box containing a span of text
giving the file name(s) of the <span data-x="concept-input-type-file-selected">selected
giving the filename(s) of the <span data-x="concept-input-type-file-selected">selected
files</span>, if any, followed by a button that, when activated, provides the user with a file
picker from which the selection can be changed. The button is expected to use <span>button
layout</span> and match the <span>'::file-selector-button'</span> pseudo-element. The contents of
Expand Down Expand Up @@ -120350,7 +120350,7 @@ interface <dfn>MimeType</dfn> {
<th> <code data-x="">download</code>
<td> <code data-x="attr-hyperlink-download">a</code>;
<code data-x="attr-hyperlink-download">area</code>
<td> Whether to download the resource instead of navigating to it, and its file name if so
<td> Whether to download the resource instead of navigating to it, and its filename if so
<td> Text
<tr>
<th> <code data-x="">draggable</code>
Expand Down

0 comments on commit ea67bde

Please sign in to comment.