From 18b8044fdfeefa9601f33d296eba95e182e6df7f Mon Sep 17 00:00:00 2001 From: Sagirov Eugeniy Date: Thu, 6 Apr 2023 16:49:50 +0300 Subject: [PATCH] fix: add js_escaped_string filter for ga_4_id --- lms/templates/certificates/accomplishment-base.html | 2 +- lms/templates/main.html | 2 +- lms/templates/public_video_share_embed.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lms/templates/certificates/accomplishment-base.html b/lms/templates/certificates/accomplishment-base.html index 52ca4efa63..38c306708f 100644 --- a/lms/templates/certificates/accomplishment-base.html +++ b/lms/templates/certificates/accomplishment-base.html @@ -29,7 +29,7 @@ course_mode_class = course_mode if course_mode else '' function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); - gtag('config', '${ga_4_id}'); + gtag('config', '${ga_4_id | n, js_escaped_string}'); % endif diff --git a/lms/templates/main.html b/lms/templates/main.html index 32be3607d3..ac43e6eba2 100644 --- a/lms/templates/main.html +++ b/lms/templates/main.html @@ -170,7 +170,7 @@ from common.djangoapps.pipeline_mako import render_require_js_path_overrides function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); - gtag('config', '${ga_4_id}'); + gtag('config', '${ga_4_id | n, js_escaped_string}'); % endif diff --git a/lms/templates/public_video_share_embed.html b/lms/templates/public_video_share_embed.html index c040bb8391..cb81c7e15c 100644 --- a/lms/templates/public_video_share_embed.html +++ b/lms/templates/public_video_share_embed.html @@ -94,7 +94,7 @@ from openedx.core.djangolib.markup import HTML function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); - gtag('config', '${ga_4_id}'); + gtag('config', '${ga_4_id | n, js_escaped_string}'); % endif