Bug Tracker

Ticket #2035: 2035.diff

File 2035.diff, 0.6 kB (added by ebartels, 10 months ago)
  • src/core.js

    a b  
    957957            // Convert html string into DOM nodes 
    958958            if ( typeof elem == "string" ) { 
    959959                // Fix "XHTML"-style tags in all browsers 
    960                 elem = elem.replace(/(<(\w+)[^>]*?)\/>/g, function(all, front, tag){ 
     960                elem = elem.replace(new RegExp("/(<(\w+)[^>]*?)\/>", "g"), function(all, front, tag){ 
    961961                    return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i) ? 
    962962                        all : 
    963963                        front + "></" + tag + ">";