Skip to content
This repository has been archived by the owner on Feb 10, 2019. It is now read-only.

XHTML / SyntaxError: An invalid or illegal string was specified #70

Open
vinkl opened this issue Mar 16, 2013 · 4 comments
Open

XHTML / SyntaxError: An invalid or illegal string was specified #70

vinkl opened this issue Mar 16, 2013 · 4 comments

Comments

@vinkl
Copy link

vinkl commented Mar 16, 2013

Line 257 should be as follows to work with XTHML:

$checkRequired = $('<input required="required"/>'),

instead of

$checkRequired = $('<input required="required">'),

Otherwise, when used with JQuery, it will cause:

SyntaxError: An invalid or illegal string was specified
tmp.innerHTML = wrap[1] + elem.replace( rxhtmlTag, "<$1></$2>" ) + wrap[2];

@ericelliott
Copy link
Owner

Thanks for the report.

@ericelliott
Copy link
Owner

If you'd like to create a pull request and make sure all the tests still pass, that would be useful.

@ericelliott
Copy link
Owner

Just a warning about XHTML or XHTML5 -- IE has never properly handled XML mime-types until IE9 -- so if you need legacy IE support, I strongly recommend that you do not use XHTML unless you have a good content negotiation strategy in place on the server so you can serve HTML5 to old IE.

@ericelliott
Copy link
Owner

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants