Misc Jquery Htmlprefilter
π
2026-06-20 | π jQuery
# jQuery jQuery.htmlPrefilter() Method
[jQuery Misc Methods](#)
## Example
Remove all ~~tags~~ from the incoming HTML string
$(function(){var htmlPrefilter = $.htmlPrefilter, rdel = /])*?1s*>/gi; $.htmlPrefilter = function(html){return htmlPrefilter.call(this, html).replace(rdel, ""); }; var htm = 'Delete
Title'; $('body').append($.htmlPrefilter(htm)); });
[Try it Β»](#)
* * *
## Definition and Usage
The $.htmlPrefilter() function modifies and filters HTML strings through jQuery manipulation methods.
**Note:** 1. This method rarely needs to be called directly; instead, it can be used as an entry point to modify existing jQuery manipulation methods.
* * *
## Syntax
_$_.htmlPrefilter( html )
| Parameter | Description |
| :--- | :--- |
| _html_ | String type. The HTML string to operate on. |
* * *

## More Examples
(#)
Any HTML string conforms to XHTML standards. Removing all tags from the incoming HTML string can also be solved this way.
* * jQuery Misc Methods](#)