/ Published in: JavaScript
                    
                                        Developed as part of my DCODR experiments...
                
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
 // Is explorer "normalisating" my closing </li> tags? fixLists = function (html) { if (navigator.userAgent.indexOf ("MSIE") != -1) { // Convert <li> to </li><li> html = html.replace (/<li(\s+[^>]*)?>/gi, "</li><li$1>"); // Then remove any that double up with the opening tag html = html.replace (/(<(ul|ol)(\s+[^>]*)?>)\s*<\/li>/gi, "$1"); } // And relax return html; };
Comments
                    Subscribe to comments
                
                