{I" class:ETI"ProcessedAsset; FI"logical_path; TI"-mercury/dependencies/jquery.htmlClean.js; FI" pathname; TI"–/home/edik/.rvm/gems/ruby-2.0.0-p247@very_simple_cms/bundler/gems/mercury-3e0245e33195/app/assets/javascripts/mercury/dependencies/jquery.htmlClean.js; FI"content_type; TI"application/javascript; TI" mtime; Tl+½¡9RI"length; TiÉGI"digest; TI"%ffcf242902cc7aadb1676471fdb407fb; FI"source; TI"ÉG/* HTML Clean for jQuery Anthony Johnston http://www.antix.co.uk version 1.2.3 $Revision: 51 $ requires jQuery http://jquery.com Use and distibution http://www.opensource.org/licenses/bsd-license.php 2010-04-02 allowedTags/removeTags added (white/black list) thanks to David Wartian (Dwartian) 2010-06-30 replaceStyles added for replacement of bold, italic, super and sub styles on a tag 2010-07-01 notRenderedTags added, where tags are to be removed but their contents are kept */ (function ($) { $.fn.htmlClean = function (options) { // iterate and html clean each matched element return this.each(function () { if (this.value) { this.value = $.htmlClean(this.value, options); } else { this.innerHTML = $.htmlClean(this.innerHTML, options); } }); }; // clean the passed html $.htmlClean = function (html, options) { options = $.extend({}, $.htmlClean.defaults, options); var tagsRE = /<(\/)?(\w+:)?([\w]+)([^>]*)>/gi; var attrsRE = /(\w+)=(".*?"|'.*?'|[^\s>]*)/gi; var tagMatch; var root = new Element(); var stack = [root]; var container = root; if (options.bodyOnly) { // check for body tag if (tagMatch = /
]*>((\n|.)*)<\/body>/i.exec(html)) { html = tagMatch[1]; } } html = html.concat("