How do I remove invisible “  ” which has been automatically added to code

前端 未结 2 1273
死守一世寂寞
死守一世寂寞 2021-01-27 09:39

I am developing a mobile website in JQuery Mobile and I am fining that at seemingly \'random\' points, the web browser is adding in:

\"  &         


        
相关标签:
2条回答
  • 2021-01-27 10:20

    I have found the answer, I asked the question on another forum and got this which has solved the issue. I thought I would post here for future reference:

    If you copied from the formatted display in your web browser, rather than using "view source", you now have Unicode \0xA0 characters in your document. Use your text editor to search and remove them. Alternately, you can install a plugin that will highlight non-ASCII characters. (I think there is one called "Unicode Highlighter" - there may be others.)

    (Posted by - watusiware)

    The original forum thread is here.

    0 讨论(0)
  • 2021-01-27 10:29

    This problem occurs when you copy and paste the source code from some website. In this way you copy invisible blank spaces which are further converted/rendered as   in the browser.

    You need to manually remove the spaces between the tags and elements. Please do the indentation by yourself. It should work :)

    0 讨论(0)
提交回复
热议问题