Bug Tracker

Ticket #2604: clean-comments.diff

File clean-comments.diff, 1.0 kB (added by flesler, 8 months ago)

This should fix this, but breaks 3 tests. I'll postpone this for now.. we have more critical tickets and we're close to a release.

  • core.js

     
    949949 
    950950            // Convert html string into DOM nodes 
    951951            if ( typeof elem == "string" ) { 
    952                 // Fix "XHTML"-style tags in all browsers 
    953                 elem = elem.replace(/(<(\w+)[^>]*?)\/>/g, function(all, front, tag){ 
    954                     return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i) ? 
    955                         all : 
    956                         front + "></" + tag + ">"; 
    957                 }); 
     952                 
     953                elem = elem 
     954                    // Remove comment nodes 
     955                    .replace(/<!--.*?-->/g, "") 
     956                    // Fix "XHTML"-style tags in all browsers 
     957                    .replace(/(<(\w+)[^>]*?)\/>/g, function(all, front, tag){ 
     958                        return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i) ? 
     959                            all : 
     960                            front + "></" + tag + ">"; 
     961                    }); 
    958962 
    959963                // Trim whitespace, otherwise indexOf won't work as expected 
    960964                var tags = jQuery.trim( elem ).toLowerCase(), div = context.createElement("div");