Metzed
Metzed

Reputation: 491

How do I get rid of this code: ​ that appears client side?

When I view the source of a page I see this bit of code appear ​ before <script> (client side) but that character doesn't appear anywhere in the php file (server side). I have tried removing all the space in the php file between </div> and <script>, but that doesn't do anything. I've also copied all this code to Notepad and then inserted it back into the PHP file, but that doesn't get rid of ​ - any idea what it is and how to get rid of it?

<div class="btn popover-link">How to use it</div>​​
<script>
$(document).ready(function() {
  $('.popover-link').popover({
     html: 'true',
    placement: 'bottom',
    title: 'How to Use It',
    content: '<strong>Content</strong>',
    trigger: 'click'
  });
});
</script>

Upvotes: 0

Views: 579

Answers (2)

James Holderness
James Holderness

Reputation: 23021

That's a zero-width space character, encoded as utf-8, but output as latin1. It's got to be in your source code somewhere, but you just can't see it.

I'd suggest you select everything from the close </div> tag to the opening <script> tag, delete that selection, then type those tags in again.

Upvotes: 2

Marcos
Marcos

Reputation: 1378

Depends on your editor, but change the encoding to UTF-8 or UTF-8 without BOM

Upvotes: 1

Related Questions