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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

0 commit comments

Comments
 (0)