Changeset 760 for trunk


Ignore:
Timestamp:
02/24/07 00:56:29 (13 years ago)
Author:
ray
Message:
  • Ticket #968 spaces are stripped from before and after tags
  • Ticket #969 DOMwalk Gecko: line breaks rendered as <br>s inside <pre> blocks
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/modules/GetHtml/DOMwalk.js

    r755 r760  
    272272        } 
    273273      } 
     274      else if (root_tag == "pre") 
     275      { 
     276        html += ((Xinha.is_ie) ? '\n' : '') + root.innerHTML.replace(/<br>/g,'\n') + '</'+root_tag+'>'; 
     277      } 
    274278      else 
    275279      { 
     
    290294 
    291295    case 3: // Node.TEXT_NODE 
    292       html = /^script|noscript|style$/i.test(root.parentNode.tagName) ? root.data : Xinha.htmlEncode(root.data).trim(); 
     296      if ( /^script|noscript|style$/i.test(root.parentNode.tagName) ) 
     297      { 
     298        html = root.data; 
     299      } 
     300      else if(root.data.trim() == '') 
     301      { 
     302        html = ''; 
     303      } 
     304      else 
     305      { 
     306        html = Xinha.htmlEncode(root.data); 
     307      } 
    293308    break; 
    294309 
Note: See TracChangeset for help on using the changeset viewer.