1

I am generating html pages from Edraw. But on those pages I have the LSEP character that appears just like that.

EDIT : the problem seems to only appear on Chrome

LSEP on my html

So I know this is a common problem and I've seen a lot of forums about that issue but never a solution that suits me.

What I want to do is to find a way to delete all those LSEP in an automatic way (because I have 34 pages with this problem). Maybe write a script and I've tried some powershell but since I can't see or detect (thus copy it in my script) the LSEP in the code itself I can't delete it...

I saw there that the problem came from a unicode, do I have to change the <meta charset="utf-8"/> balise ?

I also can't use http://www.nousphere.net/cleanspecial.php because my pages are too complicated so it messes up the whole code.

If anyone has a way to fix this thank you in advance ! Really !

Jack
  • 695
  • 10
  • 29

1 Answers1

0

I found this solution for you here: “L SEP” character shows up in Chrome

$(document).ready(function() {
  $("body").children().each(function() {
    $(this).html($(this).html().replace(/&#8232;/g," ")); 
  });
});

Below a solution in Javascript you can put in the head section of the page. The '\u2028' is the unicode notation for character 8232

<script type="text/javascript">
<!--
   window.onload = function() { document.body.innerHTML = document.body.innerHTML.replace(/\u2028/g, ''); }
//-->
</script>
Theo
  • 57,719
  • 8
  • 24
  • 41
  • Thank you, but how do I use this ? I tried to put it in one of my webpage but it doesn't do much... – Jack Jun 11 '18 at 14:13
  • Wel, the example code was php. You could also add a piece of javascript in the head section of each page like: `` – Theo Jun 11 '18 at 14:49
  • Formatting a comment is terrible i'm afraid, so i wil update the answer to also inclkude the javascript bit.. – Theo Jun 11 '18 at 14:51
  • thank you for your answer. But it doesn't work, I don't really know why though... But I just found out it's only on chrome that LSEP shows up. So maybe I'll try to use another navigator until I find a solution – Jack Jun 12 '18 at 07:46
  • 1
    Maybe Chrome handles things differently and with the script in the `` section, for Chrome the `` is not even loaded ? You could try and move the javascript to the bottom of the page, just above the final `` tag. See if that does the trick. – Theo Jun 12 '18 at 13:38
  • 1
    Of course, if you move the script to the bottom of the page, you do no longer need the `window.onload` anymore since the page is loaded already there. You can just do this: `` – Theo Jun 12 '18 at 13:43
  • Thanks ! It worked even though it deleted some elements of my page it does the job ! – Jack Jun 13 '18 at 14:20