Skip to content
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

Not working with XHTML documents #460

Closed
lacco opened this issue Aug 11, 2011 · 1 comment
Closed

Not working with XHTML documents #460

lacco opened this issue Aug 11, 2011 · 1 comment
Labels
bug Something isn't working

Comments

@lacco
Copy link

lacco commented Aug 11, 2011

Socket.io client library does not work when using it with XHTML documents with cross domain access

How can I reproduce the problem?

  1. Start socket.io server on http://localhost:8888
  2. Save https://gist.github.com/15fc854708f97cb9323e in test.html and test.xhtml
  3. Open test.html and test.xhtml at http://localhost:4444/test.(html|xhtml)

What am I expected to see?
Both documents should alert "Connected", but only the .html variant works. Tested browsers: FF5, Safari 5.1, Chrome

What might cause the issue?
In a cross-domain environment, a "SCRIPT" tag instead of a "script" tag is inserted. XHTML is based on XML and is case insenstive. XHTML tags should be in lower case (http://www.w3.org/TR/xhtml1/#h-4.2). The following fix in /socket.io/
socket.io.js, line 1539, should solve the issue:

-         , script = document.createElement('script');

@rauchg
Copy link
Contributor

rauchg commented Sep 3, 2011

Fixed in socket.io-client:
socketio/socket.io-client@24c3017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants