#1294 ✓resolved
Witold Baryluk

problem with innerHTML in Gecko in xhtml documents

Reported by Witold Baryluk | December 25th, 2011 @ 10:55 PM

Hi,

I found a problem in prototype.js when using in documents served as application/xhtml+xml

around line 1974 we have

    var LINK_ELEMENT_INNERHTML_BUGGY = (function() {
      return false;
      try {
        var el = document.createElement('div');
        el.innerHTML = "<link>";
        var isBuggy = (el.childNodes.length === 0);
        el = null;
        return isBuggy;
      } catch(e) {
        return true;
      }
    })();

Which makes SeaMonkey 2.0 (actually IceApe 2.0.6 on Debian GNU/Linux wheezy), SeaMonkey 2.6.1, and Iceweasel 9.0.1 (Firefox) and Netscape Navigator 9.0.0.6 somehow unhappy, by throwing in Error console following message:

Error: mismatched tag. Expected: </link>.
Source File: 
Line: 1, Column: 51
Source Code:
<div xmlns="http://www.w3.org/1999/xhtml"><link></div>

and in case of NN9 also some XML parsing errors.

I guess, we should use "", or detect mime type, and use "" or "", depending on mime type.

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

The Prototype JavaScript library.

Shared Ticket Bins

People watching this ticket

Pages