-1

Help me to fix this problem. The page should display - instead of –.

I already have <meta charset="utf-8" /> on my html <head>, I'm using visual studio code set to UTF-8, and the database. I'm using is mySQL, the version of my laravel is 5.4.

The – comes from the database and i'm not allowed to alter it.

Umar Abdullah
  • 1,266
  • 1
  • 14
  • 34
boosted_duck
  • 470
  • 3
  • 14

1 Answers1

0

I got tired from debugging and decided to fix it using javascript

window.onload = function() {
     removeFunnyCharacters();
}


function removeFunnyCharacters() {
     var titles, arrTitles;
     titles = document.querySelectorAll('.c-project__title');
     arrTitles = Array.prototype.slice.call(titles);

     arrTitles.forEach(function(cur) {
         cur.innerHTML = cur.innerHTML.replace('–', '-');
     });
}
boosted_duck
  • 470
  • 3
  • 14