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

Remove unnecessary special character #61

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

Conversation

andre-meyer
Copy link

@andre-meyer andre-meyer commented Sep 2, 2020

As I was working on a project, this error was thrown at me:
image
It only occured when I was using the production build, as the Javascript Bundler I used (webpack) came with a dev-server that for some reason did not throw this error.

Upon closer inspecting of the line that this "unexpected" token is found, I found the sourcecode of this project:
image

After being extremely confused about this for a few days, I searched through all the code in my dependencies for that dreaded  character. I did not find it. So I searched for all the various bits of code I saw around this broken character, which led me to the function in this Pull Request.
You see when you just use this function in a UTF-8 environment, it all works fine. You wouldn't even notice it. But I forgot the meta "charset" html tag on my project, as this was very early in development and this error had me stumped. This omitted tag made the character set default to ISO-8859-1 (which would've caused other problems too I'm sure) and turns this innocent "no-breaking space" into " Â", breaking any interpreter.

This proposed change removes this character and replaces it with a space, to save someone elses sanity.

Edit: Oh, of course. This project is abandoned. Oh well, maybe some unfortunate soul will find this PR and it may help them.

This change removes a "no-break space" that was here for some reason.
@cjay42
Copy link

cjay42 commented Sep 2, 2020

@fshost Have mercy and bring salvation to this unfortunate soul

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.

2 participants