Angular cannot load inlined templates when run in XHTML documents #1301

Closed
godmar opened this Issue Aug 27, 2012 · 2 comments

Projects

None yet

2 participants

@godmar
Contributor
godmar commented Aug 27, 2012

When in an XHTML document, all markup is removed from inlined templates.

See http://plnkr.co/edit/3hRDtK?p=preview

Reason: you use 'script.text' instead of 'script.innerHTML' to extract the template body.

@IgorMinar
Member

I wonder if IE forced us to use innerHTML. we should check on IE that script.text works fine.

@godmar
Contributor
godmar commented Aug 28, 2012

Maybe I wasn't clear. In 1.0.1 you do use script.text, but this fails for XHTML. You could use innerHTML for XHTML and get the full content (at least on Google Chrome).

I'll leave it to you to test IE.

@IgorMinar IgorMinar added a commit to IgorMinar/angular.js that referenced this issue Aug 30, 2012
@IgorMinar @IgorMinar IgorMinar + IgorMinar fix(jqLite): better support for xhtml
it turns out that some stuff doesn't work in xhtml as it does in html.

for example   can't be innerHTML-ed and auto-closing of elements
doesn't work.

the reporter of the referenced issue claimed that innerHTML vs text on
script made a difference but that doesn't appear to be true in my testing.

I'm not including test for this because testacular doesn't currently
run tests in xhtml yet.

Closes #1301
3405e3a
@IgorMinar IgorMinar added a commit that closed this issue Aug 30, 2012
@IgorMinar @IgorMinar IgorMinar + IgorMinar fix(jqLite): better support for xhtml
it turns out that some stuff doesn't work in xhtml as it does in html.

for example   can't be innerHTML-ed and auto-closing of elements
doesn't work.

the reporter of the referenced issue claimed that innerHTML vs text on
script made a difference but that doesn't appear to be true in my testing.

I'm not including test for this because testacular doesn't currently
run tests in xhtml yet.

Closes #1301
bb9bade
@IgorMinar IgorMinar closed this in bb9bade Aug 30, 2012
@IgorMinar IgorMinar added a commit that referenced this issue Aug 30, 2012
@IgorMinar @IgorMinar IgorMinar + IgorMinar fix(jqLite): better support for xhtml
it turns out that some stuff doesn't work in xhtml as it does in html.

for example   can't be innerHTML-ed and auto-closing of elements
doesn't work.

the reporter of the referenced issue claimed that innerHTML vs text on
script made a difference but that doesn't appear to be true in my testing.

I'm not including test for this because testacular doesn't currently
run tests in xhtml yet.

Closes #1301
d3fa7a2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment