Good Day!
I have problem encounter in the function in the java script. Can any one help me?
Example:
function Click_post(test)
{
code here
}
i used the function
<?php
$description ="hello world";
echo"<a href="#" onclick=\"showPreview('$description');\"> submit </a>";
?>
---- This Code is OK
but if the Value of the description is
$description ="hello world Fredo's"; // or any HTML characters tag like <tables> etc.
// I have also tried to used htmlspecialchars,html_entity_decode,stripslashes, add slashes.. but still the same
it will got an error unterminated string because of this '
There a way that java script will convert this HTML characters?
thanks and God Bless

