I am a problem, I get an information entered by the user in the database and put it in a button with onclick for the user to click put it in a modal so that it can edit, I can not put directly in the modal because they are several information then and they have to be changing depending on where the user clicks, the problem arises when it comes information with line break, (the user used an enter during insertion of the information), onclick simply does not work and gives an alert: "Uncaught SyntaxError: Invalid or unexpected token" . works normally, only with the line break that does not. Here is the code for the button:
<button class="btnEdit btn btn-primary btn-xs" onclick="editar(\'' + value.nome + '\' , \'' + value.modulo + '\' , \'' + value.roteiro + '\' ,' + value.id + ')" ><i class="fa fa-edit"></i></button>';