Changeset 435
- Timestamp:
- 12/16/05 14:41:39 (8 years ago)
- Files:
-
- 1 modified
-
trunk/plugins/GetHtml/get-html.js (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/plugins/GetHtml/get-html.js
r434 r435 36 36 /*02*/ new RegExp().compile(/\s*=\s*(([^'"][^>\s]*)([>\s])|"([^"]+)"|'([^']+)')/g),// find attributes 37 37 /*03*/ new RegExp().compile(/\/>/g),//strip singlet terminators 38 /*04*/ new RegExp().compile(/<(br|hr|img|input|link|meta|param|embed)([^>]*)>/g),//terminate singlet tags 38 /*04*/ // new RegExp().compile(/<(br|hr|img|input|link|meta|param|embed)([^>]*)>/g),//terminate singlet tags 39 /*04*/ new RegExp().compile(/<(br|hr|img|input|link|meta|param|embed|area)((\s*\S*="[^"]*")*)>/g),//terminate singlet tags 39 40 /*05*/ new RegExp().compile(/(checked|compact|declare|defer|disabled|ismap|multiple|no(href|resize|shade|wrap)|readonly|selected)([\s>])/gi),//expand singlet attributes 40 41 /*06*/ new RegExp().compile(/(="[^']*)'([^'"]*")/),//check quote nesting … … 46 47 /*12*/ new RegExp().compile(/(\S*\s*=\s*)?contenteditable[^=>]*(=\s*[^>\s\/]*)?/gi),//strip contenteditable 47 48 /*13*/ new RegExp().compile(/((href|src)=")([^\s]*)"/g), //find href and src for stripBaseHref() 48 /*14*/ new RegExp().compile(/<\/?(div|p|h[1-6]|table|tr|td|th|ul|ol|li|blockquote|object|br|hr|img|embed|param|pre|script|html|head|body|meta|link|title )[^>]*>/g),49 /*14*/ new RegExp().compile(/<\/?(div|p|h[1-6]|table|tr|td|th|ul|ol|li|blockquote|object|br|hr|img|embed|param|pre|script|html|head|body|meta|link|title|area)[^>]*>/g), 49 50 /*15*/ new RegExp().compile(/<\/(div|p|h[1-6]|table|tr|td|th|ul|ol|li|blockquote|object|html|head|body|script)( [^>]*)?>/g),//blocklevel closing tag 50 51 /*16*/ new RegExp().compile(/<(div|p|h[1-6]|table|tr|td|th|ul|ol|li|blockquote|object|html|head|body|script)( [^>]*)?>/g),//blocklevel opening tag 51 /*17*/ new RegExp().compile(/<(br|hr|img|embed|param|pre|meta|link|title )[^>]*>/g),//singlet tag52 /*17*/ new RegExp().compile(/<(br|hr|img|embed|param|pre|meta|link|title|area)[^>]*>/g),//singlet tag 52 53 /*18*/ new RegExp().compile(/(^|<\/(pre|script)>)(\s|[^\s])*?(<(pre|script)[^>]*>|$)/g),//find content NOT inside pre and script tags 53 54 /*19*/ new RegExp().compile(/(<pre[^>]*>)(\s|[^\s])*?(<\/pre>)/g),//find content inside pre tags … … 70 71 replace(c[3], '>').//strip singlet terminators 71 72 replace(c[9], '$1>').//trim whitespace 73 replace(c[5], '$1="$1"$3').//expand singlet attributes 72 74 replace(c[4], '<$1$2 />').//terminate singlet tags 73 replace(c[5], '$1="$1"$3').//expand singlet attributes74 75 replace(c[6], '$1$2').//check quote nesting 75 76 // replace(c[7], '&').//expand query ampersands
