Static GitHub Issues

[1369] js code added to head.script with innerhtml is always encoded

prev: including deferred js libraries at bottom of body
next: bug - this.$router.push doesn't work for the first click where hash is present

According to the vue-meta documentation it should be possible to add javascript to a script tag with innerHTML. But when I try this in the index.js of a plugin, the resulted js code is always encoded:

let config_js = '_paq.push(["setTrackerUrl", "' + (options.trackerUrl || options.piwikUrl+'piwik.php') + '"]);'
config_js += '_paq.push(["setSiteId", "' + options.siteId + '"])'
this.options.head.script.push({ 
  innerHTML: config_js, type: 'text/javascript'
})

results in:

<script data-n-head="true" type="text/javascript">_paq.push([&quot;setTrackerUrl&quot;, &quot;//piwik.example.com/piwik.php&quot;]);_paq.push([&quot;setSiteId&quot;, &quot;1&quot;])</script>

See #1330 for a use case

<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c1212">#c1212</a>)</em></sub></div>