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

Set correct zero-space-non-braking space #401

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

Conversation

havarnov
Copy link

The code that tries to set a zero-space-non-braking space doesn't work as intended.

'workingNode.innerHTML = "&#feff;";' works differently in different browsers:
Chrome: parses the string a escapes the ampersand.
IE: fails with a 'XML5608' syntax error (see https://msdn.microsoft.com/en-us/library/dn423949(v=vs.85).aspx).

Corrected to use the correct 'String.fromCharCode(0xfeff)'.

The code that tries to set a zero-space-non-braking space doesn't work as intended.

'workingNode.innerHTML = "&#feff;";' works differently in different browsers:
Chrome: parses the string a escapes the ampersand.
IE: fails with a 'XML5608' syntax error (see https://msdn.microsoft.com/en-us/library/dn423949(v=vs.85).aspx).

Corrected to use the correct 'String.fromCharCode(0xfeff)'.
@havarnov
Copy link
Author

Didn't find the correct place to write a test, if a test is required any help would be appreciated.

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

Successfully merging this pull request may close these issues.

1 participant