Changeset 434
- Timestamp:
- 12/14/05 20:20:12 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/plugins/GetHtml/get-html.js
r425 r434 52 52 /*18*/ new RegExp().compile(/(^|<\/(pre|script)>)(\s|[^\s])*?(<(pre|script)[^>]*>|$)/g),//find content NOT inside pre and script tags 53 53 /*19*/ new RegExp().compile(/(<pre[^>]*>)(\s|[^\s])*?(<\/pre>)/g),//find content inside pre tags 54 /*20*/ new RegExp().compile(/(^|<!--(\s|\S)*?-->)((\s|\S)*?)(?=<!--(\s|\S)*?-->|$)/g)//find content NOT inside comments 54 /*20*/ new RegExp().compile(/(^|<!--(\s|\S)*?-->)((\s|\S)*?)(?=<!--(\s|\S)*?-->|$)/g),//find content NOT inside comments 55 /*21*/ new RegExp().compile(/\S*=""/g) //find empty attributes 55 56 ]; 56 57 … … 65 66 replace(c[12], ' ').//strip contenteditable 66 67 replace(c[2], '="$2$4$5"$3').//add attribute quotes 68 replace(c[21], ' ').//strip empty attributes 67 69 replace(c[11], function(str, p1, p2) { return ' '+p1.toLowerCase()+p2; }).//lowercase attribute names 68 70 replace(c[3], '>').//strip singlet terminators … … 176 178 } 177 179 if(HTMLArea.is_gecko) 178 html = html.replace(/(.*)<br \/>\n$/, '$1'); //strip trailing <br> added by moz 180 html = html.replace(/(.*)<br \/>\n$/, '$1'). //strip trailing <br> added by moz 181 replace(/^\n(.*)/, '$1'); //strip leading newline added by moz 179 182 if (outputRoot) { 180 183 html += "</" + root_tag + ">";
Note: See TracChangeset
for help on using the changeset viewer.