You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The vast majority of XML files in the repo use two spaces today,
and even the files that contain tabs, do so only among many more
lines in the same file that are indented with spaces instead.
As such, for now, normalize toward two spaces so that only a few
files need to edited.
The exception is the JS and XSL files, of which the are only two
of each. In accordance with jQuery Style Guide, keep those as tabs.
```
$ git grep $'\t' | cut -d':' -f1 | sort | uniq
Gruntfile.js
entries2html.xsl
notes.xsl
resources/events.js
git grep $' ' | cut -d':' -f1 | sort | uniq
…
```
Closes#877.
Co-authored-by: Aurelio De Rosa <aurelioderosa@gmail.com>
Copy file name to clipboardExpand all lines: categories.xml
+36-36
Original file line number
Diff line number
Diff line change
@@ -190,15 +190,15 @@ var files = event.originalEvent.dataTransfer.files;
190
190
</category>
191
191
</category>
192
192
<categoryname="Forms"slug="forms">
193
-
<desc><![CDATA[These methods and event handlers handle forms and their various elements.]]></desc>
193
+
<desc><![CDATA[These methods and event handlers handle forms and their various elements.]]></desc>
194
194
</category>
195
195
<categoryname="Internals"slug="internals">
196
196
<desc><![CDATA[Although this category is referred to as 'internal', any methods documented within the API site should be considered public and may be freely used. ]]></desc>
197
197
</category>
198
198
<categoryname="Manipulation"slug="manipulation">
199
199
<desc><![CDATA[All of the methods in this section manipulate the DOM in some manner. A few of them simply change one of the attributes of an element (also listed in the <a href="/category/attributes/">Attributes category</a>), while others set an element's style properties (also listed in the <a href="/category/css/">CSS category</a>). Still others modify entire elements (or groups of elements) themselves—inserting, copying, removing, and so on. All of these methods are referred to as "setters," as they change the values of properties.
200
-
A few of these methods—such as <code>.attr()</code>, <code>.html()</code>, and <code>.val()</code>—also act as "getters," retrieving information from DOM elements for later use.
201
-
]]></desc>
200
+
A few of these methods—such as <code>.attr()</code>, <code>.html()</code>, and <code>.val()</code>—also act as "getters," retrieving information from DOM elements for later use.
<desc><![CDATA[All the aspects of the API that were added, or had a new signature added, in the corresponding version of jQuery. <a href="https://blog.jquery.com/2010/11/11/jquery-1-4-4-release-notes/">jQuery 1.4.4 Release Notes</a>.]]></desc>
@@ -414,11 +414,11 @@ var files = event.originalEvent.dataTransfer.files;
414
414
<categoryname="Version 1.7"slug="1.7">
415
415
<desc><![CDATA[
416
416
<p>Aspects of the API that were changed in the corresponding version of jQuery. API changes in jQuery 1.7.0 dealt primarily with the new
417
-
Event APIs: <code>.on()</code> and <code>.off()</code>
418
-
Better Support for HTML5 in IE6/7/8
419
-
<code>jQuery.Callbacks()</code>
420
-
Toggling Animations Work Intuitively
421
-
</p>
417
+
Event APIs: <code>.on()</code> and <code>.off()</code>
418
+
Better Support for HTML5 in IE6/7/8
419
+
<code>jQuery.Callbacks()</code>
420
+
Toggling Animations Work Intuitively
421
+
</p>
422
422
<p>For more information, see the Release Notes/Changelog at <a href="https://blog.jquery.com/2011/11/03/jquery-1-7-released/">https://blog.jquery.com/2011/11/03/jquery-1-7-released/</a></p>
<p>If there is more than one target element, however, cloned copies of the inserted element will be created for each target except the last, and that new set (the original element plus clones) is returned.</p>
57
-
<p><strong>Before jQuery 1.9,</strong> the append-to-single-element case did not create a new set, but instead returned the original set which made it difficult to use the <code>.end()</code> method reliably when being used with an unknown number of elements.</p>
57
+
<p><strong>Before jQuery 1.9,</strong> the append-to-single-element case did not create a new set, but instead returned the original set which made it difficult to use the <code>.end()</code> method reliably when being used with an unknown number of elements.</p>
Copy file name to clipboardExpand all lines: entries/jQuery.parseHTML.xml
+2-2
Original file line number
Diff line number
Diff line change
@@ -18,8 +18,8 @@
18
18
<p><code>jQuery.parseHTML</code> uses native methods to convert the string to a set of DOM nodes, which can then be inserted into the document. These methods do render all trailing or leading text (even if that's just whitespace). To prevent trailing/leading whitespace from being converted to text nodes you can pass the HTML string through <ahref="/jQuery.trim/"><code>jQuery.trim</code></a>.</p>
19
19
<p>By default, the <code>context</code> is the current <code>document</code> if not specified or given as <code>null</code> or <code>undefined</code>. If the HTML was to be used in another document such as an iframe, that frame's document could be used.</p>
20
20
<p>As of 3.0 the default behavior is changed. If the <code>context</code> is not specified or given as <code>null</code> or <code>undefined</code>, a new <code>document</code> is used. This can potentially improve security because inline events will not execute when the HTML is parsed. Once the parsed HTML is injected into a document it does execute, but this gives tools a chance to traverse the created DOM and remove anything deemed unsafe. This improvement does not apply to internal uses of <code>jQuery.parseHTML</code> as they usually pass in the current <code>document</code>. Therefore, a statement like <code>$( "#log" ).append( $( htmlString ) )</code> is still subject to the injection of malicious code.</p>
21
-
<h2>Security Considerations</h2>
22
-
<p>Most jQuery APIs that accept HTML strings will run scripts that are included in the HTML. <code>jQuery.parseHTML</code> does not run scripts in the parsed HTML unless <code>keepScripts</code> is explicitly <code>true</code>. However, it is still possible in most environments to execute scripts indirectly, for example via the <code><img onerror></code> attribute. The caller should be aware of this and guard against it by cleaning or escaping any untrusted inputs from sources such as the URL or cookies. For future compatibility, callers should not depend on the ability to run <em>any</em> script content when <code>keepScripts</code> is unspecified or <code>false</code>.</p>
21
+
<h2>Security Considerations</h2>
22
+
<p>Most jQuery APIs that accept HTML strings will run scripts that are included in the HTML. <code>jQuery.parseHTML</code> does not run scripts in the parsed HTML unless <code>keepScripts</code> is explicitly <code>true</code>. However, it is still possible in most environments to execute scripts indirectly, for example via the <code><img onerror></code> attribute. The caller should be aware of this and guard against it by cleaning or escaping any untrusted inputs from sources such as the URL or cookies. For future compatibility, callers should not depend on the ability to run <em>any</em> script content when <code>keepScripts</code> is unspecified or <code>false</code>.</p>
23
23
</longdesc>
24
24
<example>
25
25
<desc>Create an array of DOM nodes using an HTML string and insert it into a div.</desc>
Copy file name to clipboardExpand all lines: entries/offset.xml
+3-3
Original file line number
Diff line number
Diff line change
@@ -11,11 +11,11 @@
11
11
<p>The <code>.offset()</code> method allows us to retrieve the current position of an element (specifically its border box, which excludes margins) <em>relative to the document</em>. Contrast this with <code><ahref="/position/">.position()</a></code>, which retrieves the current position <em>relative to the offset parent</em>. When positioning a new element on top of an existing one for global manipulation (in particular, for implementing drag-and-drop), <code>.offset()</code> is more useful.</p>
12
12
<p><code>.offset()</code> returns an object containing the properties <code>top</code> and <code>left</code>.</p>
13
13
<divclass="warning">
14
-
<p><strong>Note:</strong> jQuery does not support getting the offset coordinates of hidden elements or accounting for margins set on the <code><html></code> document element.</p>
14
+
<p><strong>Note:</strong> jQuery does not support getting the offset coordinates of hidden elements or accounting for margins set on the <code><html></code> document element.</p>
15
15
<p>While it is possible to get the coordinates of elements with <code>visibility:hidden</code> set, <code>display:none</code> is excluded from the rendering tree and thus has a position that is undefined.</p>
<desc>A function to return the coordinates to set. Receives the index of the element in the collection as the first argument and the current coordinates as the second argument. The function should return an object with the new <code>top</code> and <code>left</code> properties.</desc>
Copy file name to clipboardExpand all lines: entries/position.xml
+1-1
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@
12
12
<p><strong>Note:</strong> jQuery does not support getting the position coordinates of hidden elements or accounting for margins set on the <code><html></code> document element.</p>
0 commit comments