New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xhtml not supported ? #165

Closed
andreasplesch opened this Issue Dec 22, 2014 · 4 comments

Comments

Projects
None yet
2 participants
@andreasplesch

andreasplesch commented Dec 22, 2014

Hello,

I was trying to use the widget with an xhtml document but kept running into a syntax error in jquery.
Tracking down the error, I finally used the 'simplest' example
http://docs.jquerygeo.com/examples/simplest.html

and transformed it into xhtml by declaring it xhtml and closing tags in the header:
http://plaza-omega.codio.io/jquerygeo/simplestmap/simplest.xhtml

This results in this syntax error:
[16:57:26.562] SyntaxError: An invalid or illegal string was specified @ http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js:4

The same result with jquery 2.1.3:
http://plaza-omega.codio.io/jquerygeo/simplestmap/simplest_jq213.xhtml

Is xhtml supported ?

@andreasplesch

This comment has been minimized.

Show comment
Hide comment
@andreasplesch

andreasplesch Dec 23, 2014

Using the simplest example with jsfiddle and switching to a DTD of xhtml 1.0 strict does not produce the syntax error. However, it looks like jsfiddle still serves the html with a html mime type and not xhtml, so the the browser does not parse it as xhtml.

andreasplesch commented Dec 23, 2014

Using the simplest example with jsfiddle and switching to a DTD of xhtml 1.0 strict does not produce the syntax error. However, it looks like jsfiddle still serves the html with a html mime type and not xhtml, so the the browser does not parse it as xhtml.

@ryanttb ryanttb added 2 - Medium and removed 2 - Medium labels Dec 23, 2014

@ryanttb

This comment has been minimized.

Show comment
Hide comment
@ryanttb

ryanttb Dec 23, 2014

Contributor

I can't think of a reason why it wouldn't work but it does sounds like an issue in jQuery itself. I'll look into it anyway. Thanks for posting!

Contributor

ryanttb commented Dec 23, 2014

I can't think of a reason why it wouldn't work but it does sounds like an issue in jQuery itself. I'll look into it anyway. Thanks for posting!

@andreasplesch

This comment has been minimized.

Show comment
Hide comment
@andreasplesch

andreasplesch Dec 23, 2014

Thanks. I would be glad to help however I can.

andreasplesch commented Dec 23, 2014

Thanks. I would be glad to help however I can.

@ryanttb ryanttb added this to the 1.0.0-rc1 milestone Feb 23, 2015

@ryanttb

This comment has been minimized.

Show comment
Hide comment
@ryanttb

ryanttb Sep 5, 2015

Contributor

As far as I could tell, the only thing that wasn't XHTML compliant was the default attribution text. The latest test build should work.
http://test.jquerygeo.com/simplest.xhtml
Also I noticed that your sample didn't use an XHTML doctype or CDATA markers around the JavaScript. It would still work in browsers but I believe it's non-conforming :)

Contributor

ryanttb commented Sep 5, 2015

As far as I could tell, the only thing that wasn't XHTML compliant was the default attribution text. The latest test build should work.
http://test.jquerygeo.com/simplest.xhtml
Also I noticed that your sample didn't use an XHTML doctype or CDATA markers around the JavaScript. It would still work in browsers but I believe it's non-conforming :)

@ryanttb ryanttb closed this Sep 5, 2015

ryanttb added a commit to ryanttb/geo that referenced this issue Sep 13, 2015

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