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

Replaced the custom "xsplit" function with the standard JavaScript split function #32

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mweimerskirch
Copy link
Contributor

I'm still trying to make the code more readable and easier to test and extend. IMHO the "xsplit" function can be removed. The function was necessary for qtranslate to be compatible with older browsers. Newer browser that implement ECMAScript 5 (this includes IE 9 in "standards mode") do not need this any longer. This would make the code a bit more readable, but IE 8 on the other hand would no longer be compatible. However, as WordPress displays a big warning when you use the admin area with IE 8 (or other old browsers), this should not be a problem.

@mweimerskirch
Copy link
Contributor Author

I tested the change in a lot of browsers. The only ones that failed were IE <= 8 (where WordPress displays a big warning message in the admin area so) and Konqueror (even in the most recent version). All other browsers I tested work fine. You can test for yourself if the "split" function is implemented correctly in a certain browser with this simple test page: http://michel.weimerskirch.net/xsplit-test.html (e.g. using browserstack.com).
If it's green, that means the split function captures the separator, if it's red, it didn't work and the "xsplit" workaround is still needed.
I added the same headers that WordPress uses, so IE works in the same "mode" than the WordPress admin interface.

IMHO this patch can be applied.

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

Successfully merging this pull request may close these issues.

2 participants