Skip to content Skip to sidebar Skip to footer

Why Is €‹ Or ​ Being Inserted Into My Html Body Randomly?

I found during my local development that ​ was being inserted into the page. Rows of it: ​​​​​​​​​ This is a b

Solution 1:

You have invalid (not well formed) script part of html. You have:

<scriptsrc="https://code.jquery.com/jquery-2.1.1.min.js" /><script></script>

should be:

<scriptsrc="https://code.jquery.com/jquery-2.1.1.min.js"></script>

Solution 2:

I have pasted your code into Notepad in Windows then saved it locally and browse it from FireFox and Chrome but did not see your problem.

This may be cuased by problematic jQuery loading. Try excluding loading jQuery or try to load it locally not from CDN or any online location.

You can also check this similar question: Why are these wierd characters being inserted in Facebook iframe when using jQuery? ​

Solution 3:

Self answering as I found no explanation for the strange appearances in the code, but I did find a way to fix the issue.

Copy all other code out of the old file, into a brand new blank file, block by block, completely replacing it, and the issue appears to go away.

This means it must be a character encoding issue or something? Sublime is plain text, so seems odd. But, its gone now. And I think it will be one of those that cant be explained, as it cant be reproduced by others. Useful for someone else who finds this in Google in future though. Just copy the code block by block into a new file...

Solution/Workaround fix, without a reason for why it all happened in the first place... :s

Solution 4:

I got the same issue on a Mac: Here was the issue. I copied paste from a PDF, so I had some special characters added only displayed on the browser. the solution was to delete some characters around and retype then by hand.

Post a Comment for "Why Is €‹ Or ​ Being Inserted Into My Html Body Randomly?"