L SEP code appearing in my text on Windows pcs

Am7
New Member
2 0 0

Hi there I've got an issue with code appearing in text.

L SEP code appearingL SEP code appearing

So I googled it as you do and tried all the usual stuff like cleaning re-formatting changing soft returns <p> to hard breaks <b>. then got onto Anthony via the chat and he found this bit of code to pop in to jason... 

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

Which didn't work.... So just wondering if any of you brilliant people have a) come across this before. and b) know how to fix it... 

Thanks in advance :-) 

0 Likes
Am7
New Member
2 0 0

Ok.. so just checked the code that was added to the theme.js and its right at the bottom..

 

$(document).ready(function () {
$("body").children().each(function() {
document.body.innerHTML = document.body.innerHTML.replace(/\u2028/g, ' ');
});
})

 

BUT the code recommended on google was....

$(document).ready(function() {

  $("body").children().each(function() {

    $(this).html($(this).html().replace(/&#8232;/g," "));
});
});

 

Bit different on the third line --- does anyone know why he might have changed this?

0 Likes
fortmandesign
New Member
1 0 0

Has anyone found a better solution for this? I tried that code and it ends up screwing up the entire website and does not fix the issue. Please help!

0 Likes
EnglandDev
New Member
2 0 0

The difference in the 3rd line is that he shortens it up with jQuery Methods. Essentially does the same things.
Optimally you would want to fix this in the content. For Example: Changing the content type in the schema ( text, textarea, richtext ). Modifying the way it is handled. 
LSep stands for Line Separator. 

Hope this helps in some way

 

0 Likes