You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/04/06 08:24:22 UTC

[GitHub] [airflow] uranusjr commented on a diff in pull request #22744: double escape backslash in json

uranusjr commented on code in PR #22744:
URL: https://github.com/apache/airflow/pull/22744#discussion_r843643607


##########
airflow/www/templates/airflow/gantt.html:
##########
@@ -79,6 +79,6 @@
   <script src="{{ url_for_asset('gantt.js') }}"></script>
   <script>
     // Loading data via <meta> wasn't loading extra_links in a task
-    const data = JSON.parse('{{ data|tojson }}');
+    const data = JSON.parse('{{ data|tojson|replace("\\", "\\\\") }}');

Review Comment:
   Manual replace does not look right to me. We could likely fix this by putting the string in HTML instead and use `getElementById` or something to retrieve the value here.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org