---
title: "安全的jQuery(selExp).html(content)"
author: "bellstar"
date: "2009-05-21T10:18:22Z"
tags: []
slug: "jquery-selexp-html-content"
draft: false
lastmod: "2009-05-21T10:20:56Z"
id: 392365
url: "https://bellstar.iteye.com/blog/392365"
---

```java

				jQuery.prototype.html_script = jQuery.prototype.html;
				jQuery.prototype.html = function(value){
					if(value){
						value = value.replace(/<script.*?>[\s\s]*?(?:<\/script>)/ig,'');
					}
					return this.html_script(value);
				};

```