It is giving me an unterminated string literal error: var image_file_name = "<br/> for this line below:
var image_file_name = "<?php echo str_replace("\n", "", $image_file_name); ?>";
Any ideas on how this can fixed? Open to all ideas to test 🙂
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You’re removing
\nnewlines but not\rcarriage returns. Try removing both. It looks like IE (and possibly other browsers) also treats\ras a line break.Perhaps:
(I’m assuming that
$image_file_namecontains Windows-style\r\nline breaks, not *nix-style\nline breaks.)