论坛首页 Web前端技术论坛

安全的jQuery(selExp).html(content)

浏览 1363 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
作者 正文
   发表时间:2009-05-21   最后修改:2009-05-21
				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);
				};
论坛首页 Web前端技术版

跳转论坛:
Global site tag (gtag.js) - Google Analytics