Why is “​” being injected into my HTML?

后端 未结 8 1645

EDIT: You can see the issue here (look in source).

EDIT2: Interesting, it is not an issue in source. Only with the console (Firebug as well).

I have

相关标签:
8条回答
  • 2020-11-29 05:23

    I have experienced this in a major project I was working on.

    The trick is to just:

    • copy the whole code into notepad.

    • save it as a text file.

    • close the file. open it again and copy your code back into your IDE
      environment.

    and its voilà, it's gone.!

    0 讨论(0)
  • 2020-11-29 05:25

    I cannot find where it's being injected on my page. I'll investigate it more later, but for now, I just threw this in my page so I can keep working.

    $(function(){
        $('body').contents().eq(0).each(function(){
            if(this.nodeName.toString()=='#text' && this.data.trim().charCodeAt(0)==8203){
                $(this).remove();
            }
        });
    });
    
    0 讨论(0)
提交回复
热议问题