Skip to content

Commit

Permalink
fix: Use escapejs for app context (#9059)
Browse files Browse the repository at this point in the history
  • Loading branch information
timgl committed Mar 16, 2022
1 parent 8379b92 commit c0a2abd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion posthog/templates/head.html
Expand Up @@ -28,7 +28,7 @@
<script>window.SENTRY_DSN = '{{sentry_dsn}}';</script>
{% endif %}
<script id='posthog-app-user-preload'>
window.POSTHOG_APP_CONTEXT = {{ posthog_app_context | safe }};
window.POSTHOG_APP_CONTEXT = JSON.parse("{{ posthog_app_context | escapejs }}");
// Inject the expected location of JS bundle, use to allow the location of
// he bundle to be set at runtime, e.g. for PostHog Cloud we serve the
// frontent JS from a CDN
Expand Down

0 comments on commit c0a2abd

Please sign in to comment.