Fullcalendar Uncaught Syntaxerror: Invalid or Unexpected token in description when skipping line

Asked

Viewed 94 times

0

  • 1

    This may be happening for N reasons, version of your database, version of your php, or configuration of your server. I work on a server that does not accept line breaking, because php interprets the break as a new line, generating the same error you have. I solved the problem using a two functions one to treat the text input and the other to treat the output, I will post below.

1 answer

0


The first treats the line break coming out of your textarea to save in the bank, if you want you can put a <br> in str_replace.

public function trataQuebra($texto){
    $processa_texto = preg_replace("/\r?\n/","", $texto);
    $processa_texto = str_replace('"', '', $processa_texto);
    $processa_texto = str_replace("'", "", $processa_texto);
    return trim($processa_texto);
}

Browser other questions tagged

You are not signed in. Login or sign up in order to post.