Skip to content

Commit 7066965

Browse files
committed
Fix jquery#35: Properly escape title and desc for json
* Apply xml2json templates * Wrap entry <desc>s with nested elements in CDATA * If more than one entry in a file, use the first * Add missing <title> nodes
1 parent 246ad94 commit 7066965

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+63
-45
lines changed

entries/ajaxComplete.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<desc>The function to be invoked.</desc>
77
</argument>
88
</signature>
9-
<desc>Register a handler to be called when Ajax requests complete. This is an <a href='http://docs.jquery.com/Ajax_Events'>AjaxEvent</a>.</desc>
9+
<desc><![CDATA[Register a handler to be called when Ajax requests complete. This is an <a href="http://docs.jquery.com/Ajax_Events">AjaxEvent</a>.]]></desc>
1010
<longdesc><p>Whenever an Ajax request completes, jQuery triggers the <code>ajaxComplete</code> event. Any and all handlers that have been registered with the <code>.ajaxComplete()</code> method are executed at this time.</p>
1111
<p>To observe this method in action, we can set up a basic Ajax load request:</p>
1212
<pre>&lt;div class="trigger"&gt;Trigger&lt;/div&gt;

entries/ajaxError.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<desc>The function to be invoked.</desc>
77
</argument>
88
</signature>
9-
<desc>Register a handler to be called when Ajax requests complete with an error. This is an <a href='http://docs.jquery.com/Ajax_Events'>Ajax Event</a>.</desc>
9+
<desc><![CDATA[Register a handler to be called when Ajax requests complete with an error. This is an <a href='http://docs.jquery.com/Ajax_Events'>Ajax Event</a>.]]></desc>
1010
<longdesc><p>Whenever an Ajax request completes with an error, jQuery triggers the <code>ajaxError</code> event. Any and all handlers that have been registered with the <code>.ajaxError()</code> method are executed at this time.</p>
1111
<p>To observe this method in action, set up a basic Ajax load request.</p>
1212
<pre>&lt;button class="trigger"&gt;Trigger&lt;/button&gt;

entries/ajaxSend.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<desc>The function to be invoked.</desc>
77
</argument>
88
</signature>
9-
<desc>Attach a function to be executed before an Ajax request is sent. This is an <a href='http://docs.jquery.com/Ajax_Events'>Ajax Event</a>.</desc>
9+
<desc><![CDATA[Attach a function to be executed before an Ajax request is sent. This is an <a href='http://docs.jquery.com/Ajax_Events'>Ajax Event</a>.]]></desc>
1010
<longdesc>
1111
<p>Whenever an Ajax request is about to be sent, jQuery triggers the <code>ajaxSend</code> event. Any and all handlers that have been registered with the <code>.ajaxSend()</code> method are executed at this time.</p>
1212
<p>To observe this method in action, we can set up a basic Ajax load request:</p>

entries/ajaxStart.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<desc>The function to be invoked.</desc>
77
</argument>
88
</signature>
9-
<desc>Register a handler to be called when the first Ajax request begins. This is an <a href='http://docs.jquery.com/Ajax_Events'>Ajax Event</a>.</desc>
9+
<desc><![CDATA[Register a handler to be called when the first Ajax request begins. This is an <a href='http://docs.jquery.com/Ajax_Events'>Ajax Event</a>.]]></desc>
1010
<longdesc><p>Whenever an Ajax request is about to be sent, jQuery checks whether there are any other outstanding Ajax requests. If none are in progress, jQuery triggers the <code>ajaxStart</code> event. Any and all handlers that have been registered with the <code>.ajaxStart()</code> method are executed at this time.</p>
1111
<p>To observe this method in action, we can set up a basic Ajax load request:</p>
1212
<pre>&lt;div class="trigger"&gt;Trigger&lt;/div&gt;

entries/ajaxStop.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<entry type='method' name="ajaxStop" return="jQuery">
22
<title>.ajaxStop()</title>
3-
<desc>Register a handler to be called when all Ajax requests have completed. This is an <a href='http://docs.jquery.com/Ajax_Events'>Ajax Event</a>.</desc>
3+
<desc><![CDATA[Register a handler to be called when all Ajax requests have completed. This is an <a href='http://docs.jquery.com/Ajax_Events'>Ajax Event</a>.]]></desc>
44
<signature>
55
<added>1.0</added>
66
<argument name="handler()" type="Function">

entries/ajaxSuccess.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<desc>The function to be invoked.</desc>
77
</argument>
88
</signature>
9-
<desc>Attach a function to be executed whenever an Ajax request completes successfully. This is an <a href='http://docs.jquery.com/Ajax_Events'>Ajax Event</a>.</desc>
9+
<desc><![CDATA[Attach a function to be executed whenever an Ajax request completes successfully. This is an <a href='http://docs.jquery.com/Ajax_Events'>Ajax Event</a>.]]></desc>
1010
<longdesc>
1111
<p>Whenever an Ajax request completes successfully, jQuery triggers the <code>ajaxSuccess</code> event. Any and all handlers that have been registered with the <code>.ajaxSuccess()</code> method are executed at this time.</p>
1212
<p>To observe this method in action, we can set up a basic Ajax load request:</p>

entries/context.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<entry type='property' name="context" return="Element">
22
<title>.context</title>
33
<signature><added>1.3</added></signature>
4-
<desc>The DOM node context originally passed to <code>jQuery()</code>; if none was passed then context will likely be the document.</desc>
4+
<desc><![CDATA[The DOM node context originally passed to <code>jQuery()</code>; if none was passed then context will likely be the document.]]></desc>
55
<longdesc><p>The <code>.live()</code> method for binding event handlers uses this property to determine the root element to use for its event delegation needs.</p>
66
<p>The value of this property is typically equal to <code>document</code>, as this is the default context for jQuery objects if none is supplied. The context may differ if, for example, the object was created by searching within an <code>&lt;iframe&gt;</code> or XML document.</p>
77
<p>Note that the context property may only apply to the elements originally selected by <code>jQuery()</code>, as it is possible for the user to add elements to the collection via methods such as <code>.add()</code> and these may have a different context.</p>

entries/deferred.notify.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</desc>
99
</argument>
1010
</signature>
11-
<desc> Call the progressCallbacks on a Deferred object with the given <code>args</code>. </desc>
11+
<desc><![CDATA[ Call the progressCallbacks on a Deferred object with the given <code>args</code>. ]]></desc>
1212
<longdesc>
1313
<p>Normally, only the creator of a Deferred should call this method; you can prevent other code from changing the Deferred's state or reporting status by returning a restricted Promise object through deferred.promise().</p>
1414
<p>When <code>deferred.notify</code> is called, any progressCallbacks added by <a href="http://api.jquery.com/deferred.then/"><code>deferred.then</code></a> or <a href="http://api.jquery.com/deferred.progress/"><code>deferred.progress</code></a> are called. Callbacks are executed in the order they were added. Each callback is passed the <code>args</code> from the <code>.notify()</code>. Any calls to <code>.notify()</code> after a Deferred is resolved or rejected (or any progressCallbacks added after that) are ignored. For more information, see the documentation for <a href="http://api.jquery.com/category/deferred-object/">Deferred object</a>.</p>

entries/deferred.notifyWith.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</desc>
1414
</argument>
1515
</signature>
16-
<desc> Call the progressCallbacks on a Deferred object with the given context and <code>args</code>. </desc>
16+
<desc><![CDATA[ Call the progressCallbacks on a Deferred object with the given context and <code>args</code>. ]]></desc>
1717
<longdesc>
1818
<p>Normally, only the creator of a Deferred should call this method; you can prevent other code from changing the Deferred's state or reporting status by returning a restricted Promise object through deferred.promise().</p>
1919
<p>When <code>deferred.notifyWith</code> is called, any progressCallbacks added by <a href="http://api.jquery.com/deferred.then/"><code>deferred.then</code></a> or <a href="http://api.jquery.com/deferred.progress/"><code>deferred.progress</code></a> are called. Callbacks are executed in the order they were added. Each callback is passed the <code>args</code> from the <code>.notifyWith()</code>. Any calls to <code>.notifyWith()</code> after a Deferred is resolved or rejected (or any progressCallbacks added after that) are ignored. For more information, see the documentation for <a href="http://api.jquery.com/category/deferred-object/">Deferred object</a>.</p>

entries/deferred.reject.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</desc>
99
</argument>
1010
</signature>
11-
<desc> Reject a Deferred object and call any failCallbacks with the given <code>args</code>. </desc>
11+
<desc><![CDATA[ Reject a Deferred object and call any failCallbacks with the given <code>args</code>. ]]></desc>
1212
<longdesc> <p>Normally, only the creator of a Deferred should call this method; you can prevent other code from changing the Deferred's state by returning a restricted Promise object through <a href="http://api.jquery.com/deferred.promise/"><code>deferred.promise()</code></a>.</p>
1313
<p>When the Deferred is rejected, any failCallbacks added by <a href="http://api.jquery.com/deferred.then/"><code>deferred.then</code></a> or <a href="http://api.jquery.com/deferred.fail/"><code>deferred.fail</code></a> are called. Callbacks are executed in the order they were added. Each callback is passed the <code>args</code> from the <code>deferred.reject()</code> call. Any failCallbacks added after the Deferred enters the rejected state are executed immediately when they are added, using the arguments that were passed to the <code>.reject()</code> call. For more information, see the documentation for <a href="http://api.jquery.com/category/deferred-object/">Deferred object</a>.</p> </longdesc>
1414

entries/deferred.rejectWith.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</desc>
1414
</argument>
1515
</signature>
16-
<desc> Reject a Deferred object and call any failCallbacks with the given <code>context</code> and <code>args</code>. </desc>
16+
<desc><![CDATA[ Reject a Deferred object and call any failCallbacks with the given <code>context</code> and <code>args</code>. ]]></desc>
1717
<longdesc> <p>Normally, only the creator of a Deferred should call this method; you can prevent other code from changing the Deferred's state by returning a restricted Promise object through <a href="http://api.jquery.com/deferred.promise/"><code>deferred.promise()</code></a>.</p>
1818
<p>When the Deferred is rejected, any failCallbacks added by <a href="/deferred.then/"><code>deferred.then</code></a> or <a href="/deferred.fail/"><code>deferred.fail</code></a> are called. Callbacks are executed in the order they were added. Each callback is passed the <code>args</code> from the <code>deferred.reject()</code> call. Any failCallbacks added after the Deferred enters the rejected state are executed immediately when they are added, using the arguments that were passed to the <code>.reject()</code> call. For more information, see the documentation for <a href="/category/deferred-object/">Deferred object</a>.</p> </longdesc>
1919
<category slug="deferred-object"/>

entries/deferred.resolve.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</desc>
99
</argument>
1010
</signature>
11-
<desc> Resolve a Deferred object and call any doneCallbacks with the given <code>args</code>. </desc>
11+
<desc><![CDATA[ Resolve a Deferred object and call any doneCallbacks with the given <code>args</code>. ]]></desc>
1212
<longdesc> <p>When the Deferred is resolved, any doneCallbacks added by <a href="/deferred.then/"><code>deferred.then</code></a> or <a href="/deferred.done/"><code>deferred.done</code></a> are called. Callbacks are executed in the order they were added. Each callback is passed the <code>args</code> from the <code>.resolve()</code>. Any doneCallbacks added after the Deferred enters the resolved state are executed immediately when they are added, using the arguments that were passed to the <code>.resolve()</code> call. For more information, see the documentation for <a href="/category/deferred-object/">Deferred object</a>.</p> </longdesc>
1313

1414
<category slug="deferred-object"/>

entries/deferred.resolveWith.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</desc>
1414
</argument>
1515
</signature>
16-
<desc> Resolve a Deferred object and call any doneCallbacks with the given <code>context</code> and <code>args</code>. </desc>
16+
<desc><![CDATA[ Resolve a Deferred object and call any doneCallbacks with the given <code>context</code> and <code>args</code>. ]]></desc>
1717
<longdesc> <p>Normally, only the creator of a Deferred should call this method; you can prevent other code from changing the Deferred's state by returning a restricted Promise object through <a href="http://api.jquery.com/deferred.promise/"><code>deferred.promise()</code></a>.</p>
1818
<p>When the Deferred is resolved, any doneCallbacks added by <a href="/deferred.then/"><code>deferred.then</code></a> or <a href="/deferred.done/"><code>deferred.done</code></a> are called. Callbacks are executed in the order they were added. Each callback is passed the <code>args</code> from the <code>.resolve()</code>. Any doneCallbacks added after the Deferred enters the resolved state are executed immediately when they are added, using the arguments that were passed to the <code>.resolve()</code> call. For more information, see the documentation for <a href="/category/deferred-object/">Deferred object</a>.</p> </longdesc>
1919

entries/die.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<entry type='method' name="die" return="jQuery">
33
<title>.die()</title>
44
<deprecated>1.7</deprecated>
5-
<desc>Remove all event handlers previously attached using <code>.live()</code> from the elements.</desc>
5+
<desc><![CDATA[Remove all event handlers previously attached using <code>.live()</code> from the elements.]]></desc>
66
<signature>
77
<added>1.4.1</added>
88
</signature>
@@ -20,7 +20,7 @@
2020
</entry>
2121
<entry type='method' name="die" return="jQuery">
2222
<deprecated>1.7</deprecated>
23-
<desc>Remove an event handler previously attached using <code>.live()</code> from the elements.</desc>
23+
<desc><![CDATA[Remove an event handler previously attached using <code>.live()</code> from the elements.]]></desc>
2424
<signature>
2525
<added>1.3</added>
2626
<argument name="eventType" type="String">

entries/eq-selector.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<desc>Zero-based index of the element to match.</desc>
88
</argument>
99
</signature>
10-
<desc>Select the element at index <code>n</code> within the matched set.</desc>
10+
<desc><![CDATA[Select the element at index <code>n</code> within the matched set.]]></desc>
1111
<longdesc><p>The index-related selectors (<code>:eq()</code>, <code>:lt()</code>, <code>:gt()</code>, <code>:even</code>, <code>:odd</code>) filter the set of elements that have matched the expressions that precede them. They narrow the set down based on the order of the elements within this matched set. For example, if elements are first selected with a class selector (<code>.myclass</code>) and four elements are returned, these elements are given indices <code>0</code> through <code>3</code> for the purposes of these selectors.</p>
1212
<p>Note that since JavaScript arrays use <em>0-based indexing</em>, these selectors reflect that fact. This is why <code>$('.myclass:eq(1)')</code> selects the second element in the document with the class myclass, rather than the first. In contrast, <code>:nth-child(n)</code> uses <em>1-based indexing</em> to conform to the CSS specification.</p>
1313
<p>Unlike the <a href="http://api.jquery.com/eq/"><code>.eq(index)</code></a> method, the <code>:eq(index)</code> selector does <em>not</em> accept a negative value for <code>index</code>. For example, while <code>$('li').eq(-1)</code> selects the last <code>li</code> element, <code>$('li:eq(-1)')</code> selects nothing.</p>

entries/even-selector.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<title>:even Selector</title>
33
<sample>:even</sample>
44
<signature><added>1.0</added> </signature>
5-
<desc>Selects even elements, zero-indexed. See also <a href="/Selectors/odd">odd</a>.</desc>
5+
<desc><![CDATA[Selects even elements, zero-indexed. See also <a href="/Selectors/odd">odd</a>.]]></desc>
66
<longdesc><p>In particular, note that the <em>0-based indexing</em> means that, counter-intuitively, <code>:even</code> selects the first element, third element, and so on within the matched set.</p></longdesc>
77

88
<note id="jquery-selector-extension" type="additional">

entries/event.currentTarget.xml

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<entry type='property' name="event.currentTarget" return="Element">
2+
<title>event.currentTarget</title>
23
<signature>
34
<added>1.3</added>
45
</signature>

entries/event.data.xml

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<entry type='property' name="event.data">
2+
<title>event.data</title>
23
<signature>
34
<added>1.1</added>
45
</signature>

entries/event.delegateTarget.xml

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<entry type='property' name="event.delegateTarget" return="Element">
2+
<title>event.delegateTarget</title>
23
<signature>
34
<added>1.7</added>
45
</signature>

entries/event.isDefaultPrevented.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<signature>
44
<added>1.3</added>
55
</signature>
6-
<desc>Returns whether <a href="/event.preventDefault">event.preventDefault()</a> was ever called on this event object. </desc>
6+
<desc><![CDATA[Returns whether <a href="/event.preventDefault">event.preventDefault()</a> was ever called on this event object. ]]></desc>
77
<longdesc> </longdesc>
88
<example>
99
<desc>Checks whether event.preventDefault() was called.</desc>

entries/event.isPropagationStopped.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<signature>
44
<added>1.3</added>
55
</signature>
6-
<desc> Returns whether <a href="/event.stopPropagation">event.stopPropagation()</a> was ever called on this event object. </desc>
6+
<desc><![CDATA[ Returns whether <a href="/event.stopPropagation">event.stopPropagation()</a> was ever called on this event object. ]]></desc>
77
<longdesc><p>This event method is described in the <a href="http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/events.html#Events-Event-isPropagationStopped">W3C DOM Level 3 specification</a>.</p></longdesc>
88
<example>
99
<desc>Checks whether event.stopPropagation() was called</desc>

entries/event.namespace.xml

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<entry type='property' name="event.namespace" return="String">
2+
<title>event.namespace</title>
23
<signature>
34
<added>1.4.3</added>
45
</signature>

entries/event.pageX.xml

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<entry type='property' name="event.pageX" return="Number">
2+
<title>event.pageX</title>
23
<signature>
34
<added>1.0.4</added>
45
</signature>

entries/event.pageY.xml

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<entry type='property' name="event.pageY" return="Number">
2+
<title>event.pageY</title>
23
<signature>
34
<added>1.0.4</added>
45
</signature>

entries/event.relatedTarget.xml

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<entry type='property' name="event.relatedTarget" return="Element">
2+
<title>event.relatedTarget</title>
23
<signature>
34
<added>1.1.4</added>
45
</signature>

entries/event.result.xml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
<entry type='property' name="event.result" return="Object">
2+
<title>event.result</title>
23
<signature>
34
<added>1.3</added>
45
</signature>
5-
<desc> The last value returned by an event handler that was triggered by this event, unless the value was <code>undefined</code>. </desc>
6+
<desc><![CDATA[The last value returned by an event handler that was triggered by this event, unless the value was <code>undefined</code>.]]></desc>
67
<longdesc> <p>This property can be useful for getting previous return values of custom events. </p></longdesc>
78
<example>
89
<desc>Display previous handler's return value</desc>

entries/event.target.xml

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<entry type='property' name="event.target" return="Element">
2+
<title>event.target</title>
23
<signature>
34
<added>1.0</added>
45
</signature>

entries/event.timeStamp.xml

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<entry type='property' name="event.timeStamp" return="Number">
2+
<title>event.timeStamp</title>
23
<signature>
34
<added>1.2.6</added>
45
</signature>

entries/event.type.xml

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<entry type='property' name="event.type" return="String">
2+
<title>event.type</title>
23
<signature>
34
<added>1.0</added>
45
</signature>

entries/event.which.xml

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<entry type='property' name="event.which" return="Number">
2+
<title>event.which</title>
23
<signature>
34
<added>1.1.3</added>
45
</signature>

entries/focus-selector.xml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
<entry type='selector' name="focus" return="">
1+
<entry type='selector' name="focus" return="">
2+
<title>:focus Selector</title>
23
<sample>:focus</sample>
34
<signature><added>1.6</added> </signature>
45
<desc>Selects element if it is currently focused.</desc>

entries/focus.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<entry type='method' name="focus" return="jQuery">
2-
<title>:focus selector</title>
2+
<title>.focus()</title>
33
<desc>Bind an event handler to the "focus" JavaScript event, or trigger that event on an element.</desc>
44
<signature>
55
<added>1.0</added>

0 commit comments

Comments
 (0)