title: SyntaxError: '' string literal contains an unescaped line break
body: <p>I have a console error that tells me this:</p>
  
  <blockquote>
    <p>SyntaxError: '' string literal contains an unescaped line break</p>
  </blockquote>
  
  <p>I have checked my syntax several times but I cannot correct the error. I'll copy the code to you if you can identify something. </p>
  
  <pre><code>    $('#nouveau').click(function(){
          $('#action').html('&lt;?php echo preg_replace('/\s\s+/', '', $langs-&gt;trans("Delete") ); ?&gt;');
          $('.titre_ecv').html('&lt;?php echo addslashes(trim(preg_replace('/\s\s+/', '', $langs-&gt;trans("ecv_nouveau_formation")))); ?&gt;');
          $('.nouveau').show();
          $('#valider').show();
          $id=$('#tr_formations tr').length+1; 
          $('#tr_formations').append('&lt;tr&gt;&lt;td&gt;&lt;input name="action" type="hidden" value="create"&gt;&lt;input type="text" name="formations['+$id+'][etablissement]" autocomplete="off" style="width:95%" /&gt;&lt;/td&gt; &lt;td style="width:10%;"&gt; &lt;select class="niveau flat" id="niveau" name="formations['+$id+'][niveau]" &gt;&lt;option value="0" &gt;&lt;/option&gt;&lt;option value="Qualifiant"  &gt;&lt;?php echo preg_replace('/\s\s+/', '', $langs-&gt;trans("Qualifiant") ); ?&gt;&lt;/option&gt;&lt;option value="Bac" &gt;Bac &lt;/option&gt; &lt;option value="Bac+1" &gt;Bac+1 &lt;/option&gt;&lt;option value="Bac+2" &gt;Bac+2 &lt;/option&gt;&lt;option value="Bac+3" &gt;Bac+3 &lt;/option&gt;&lt;option value="Bac+4" &gt;Bac+4 &lt;/option&gt;&lt;option value="Bac+5" &gt;Bac+5 &lt;/option&gt;&lt;option value="Master_specialisé" &gt;&lt;?php echo preg_replace('/\s\s+/', '', $langs-&gt;trans("Master_specialisé") ); ?&gt; &lt;/option&gt;&lt;option value="Master_recherche" &gt;&lt;?php echo preg_replace('/\s\s+/', '', $langs-&gt;trans("Master_recherche") ); ?&gt; &lt;/option&gt; &lt;option value="Doctorat" &gt;Doctorat &lt;/option&gt;&lt;/select&gt; &lt;/td&gt; &lt;td &gt;&lt;input type="text"  name="formations['+$id+'][intitule]" autocomplete="off" style="width:95%" /&gt;&lt;/td&gt; &lt;td&gt;&lt;input type="text"  name="formations['+$id+'][filiere]" autocomplete="off" style="width:95%" /&gt;&lt;/td&gt;&lt;td style="width:8%;"&gt;&lt;input type="text" name="formations['+$id+'][debut]" class="datepicker debut" value="&lt;?php echo date('d/m/Y') ?&gt;" onchange="MinDate(this);" autocomplete="off" /&gt;&lt;/td&gt; &lt;td style="width:8%;"&gt;&lt;input type="text" name="formations['+$id+'][fin]" value="&lt;?php echo date('d/m/Y') ?&gt;" class="datepicker fin" onchange="MaxDate(this);" autocomplete="off" /&gt;&lt;div align="center"&gt;&lt;label&gt;&lt;input type="checkbox" name="experiences['+$id+'][no_jours]" onchange="no_jourss(this);"&gt; &lt;b class="nos_jour"&gt;&lt;?php echo trim(preg_replace('/\s\s+/', '', $langs-&gt;trans("ecv_no_jours") )); ?&gt;&lt;/b&gt;&lt;/label&gt;&lt;/div&gt; &lt;/td&gt;&lt;td align="center"&gt;&lt;img src="&lt;?php echo DOL_MAIN_URL_ROOT.'/theme/md/img/delete.png' ?&gt;" class="img_delete" onclick="delete_tr(this);"&gt;&lt;/td&gt;&lt;/tr&gt;');
          $( ".datepicker" ).datepicker({
              dateFormat: 'dd/mm/yy'
          });
          $(".niveau").select2()
      });
  </code></pre>
  
  <p>My job is to correct an existing code. Thank you for your help</p>