Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

nodeName_ does not properly canonicalize element names when using XHTML #3987

Closed
@ysulyma

Description

@ysulyma

Angular code assumes that element names will be uppercase. I am using Angular with XHTML5 (with application/xhtml+xml MIME type), where this is not the case. The code in question is the following:

if (msie < 9) {
  nodeName_ = function(element) {
    element = element.nodeName ? element : element[0];
    return (element.scopeName && element.scopeName != 'HTML')
      ? uppercase(element.scopeName + ':' + element.nodeName) : element.nodeName;
  };
} else {
  nodeName_ = function(element) {
    return element.nodeName ? element.nodeName : element[0].nodeName;
  };
}

I was able to remedy this in my situation by simply wrapping the return value of the else block in a call to uppercase(); however, before committing this as a fix I'd like some insight from someone who knows the internals better than me.

Specifically, I'm not sure if/how the msie < 9 block should be changed. I'm guessing the return value should be wrapped again, but does element.scopeName also need to be canonicalized? Is this a moot point since IE doesn't support XHTML anyway?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions