title: Quote from PHP is transformed into &#039 into JavaScript
body: <p>I need a specific format that I build in my PHP and which is then sent to my view and the JavaScript (using Symfony, but this is not a Symfony issue).</p>
  <p>The problem is specified in the title: the <code>'</code> from the string is transformed into my js and I don't want it to be transformed</p>
  <p>Here are how it looks like</p>
  <p>PHP side</p>
  <pre><code>        case &quot;01&quot;:
              $dynamic_month=&quot;['Février &quot;.$previous_year.&quot;','Mars &quot;.$previous_year.&quot;','Avril &quot;.$previous_year.&quot;','Mai &quot;.$previous_year.&quot;
              ','Juin &quot;.$previous_year.&quot;','Juillet &quot;.$previous_year.&quot;','Août &quot;.$previous_year.&quot;','Septembre &quot;.$previous_year.&quot;','Octobre 
              &quot;.$previous_year.&quot;','Novembre &quot;.$previous_year.&quot;','Décembre &quot;.$previous_year.&quot;','Janvier &quot;.$year.&quot;']&quot;;
              break;
  </code></pre>
  <p>This is building a string with something like <code>['Month Year','NextMonth Year']</code> (this is what a var_dump is printing.</p>
  <p>But in my JavaScript (chart.js inside a twig view). The <code>'</code> are replaced.</p>
  <pre><code>var chart = new Chart(ctx, {
                  // The type of chart we want to create
                  type: 'line',
  
                  // The data for our dataset
                  data: {
                      labels: {{ dynamic_month }},
                      datasets: [{
                          label: &quot;Connexion / mois&quot;,
                          backgroundColor: 'rgb(255, 99, 132)',
                          borderColor: 'rgb(255, 99, 132)',
                          data: connectedByMonth,
                      }]
                  },
  
                  // Configuration options go here
                  options: {}
              });
  </code></pre>
  <p>The issue is on the line</p>
  <p><code>labels: {{ dynamic_month }}</code></p>
  <p>this is replaced once compiled by this</p>
  <p><code>labels: [&amp;#039;Février 2018&amp;#039;,&amp;#039;Mars 2018&amp;#039;, et caetera et caetera</code></p>