-
Notifications
You must be signed in to change notification settings - Fork 265
/
Copy pathjQuery.htmlPrefilter.xml
17 lines (17 loc) · 1.38 KB
/
jQuery.htmlPrefilter.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<?xml version="1.0"?>
<entry type="method" name="jQuery.htmlPrefilter" return="String">
<title>jQuery.htmlPrefilter()</title>
<desc>Modify and filter HTML strings passed through <a href="/category/manipulation/">jQuery manipulation methods</a>.</desc>
<signature>
<added>1.12-and-2.2</added>
<argument name="html" type="String">
<desc>The HTML string on which to operate.</desc>
</argument>
</signature>
<longdesc>
<p>This method rarely needs to be called directly. Instead, use it as an entry point to modify existing <a href="/category/manipulation/">jQuery manipulation methods</a>. jQuery calls this method on input HTML before processing it further: it accepts an HTML string & should return a HTML string as well.</p>
<p>This function can also be overwritten in order to bypass certain edge case issues. The default <code>htmlPrefilter</code> function in jQuery leaves input unmodified since 3.5.0. Older versions would greedily ensure that all tags were XHTML-compliant. This included anything that looked like an HTML tag, but was actually within a string (e.g. <code><a title="<div />"><></code>), leading to potential security issues. For more information, see the <a href="https://jquery.com/upgrade-guide/3.5/">jQuery Core 3.5 Upgrade guide</a>.</p>
</longdesc>
<category slug="manipulation"/>
<category slug="version/3.5"/>
</entry>