I have a text which was retrieved from my database with PHP
and has characters like "
'
and also has line breaks. Now I passed it to a jQuery
string using the backticks like this
var str = `<?php echo $text; ?>`;
And it works fine with desktop browsers but when I try it with mobile browsers though I can't see the console.log in mobile browsers but I believe I am getting some errors because my jQuery code refuse to function, but when I comment out the above line it works fine. Please anyone know how I can fix this?