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 2019/10/07 15:43:20 UTC

[GitHub] [airflow] mik-laj commented on a change in pull request #6265: [AIRFLOW-5597] Linkify urls in task instance log

mik-laj commented on a change in pull request #6265: [AIRFLOW-5597] Linkify urls in task instance log
URL: https://github.com/apache/airflow/pull/6265#discussion_r332093938
 
 

 ##########
 File path: airflow/www/templates/airflow/ti_log.html
 ##########
 @@ -121,10 +121,18 @@ <h4>{{ title }}</h4>
           if (res.message) {
             // Auto scroll window to the end if current window location is near the end.
             if(auto_tailing && checkAutoTailingCondition()) {
-              var should_scroll = true
+              var should_scroll = true;
             }
             // The message may contain HTML, so either have to escape it or write it as text.
-            document.getElementById(`try-${try_number}`).textContent += res.message + "\n";
+            var escaped_message = $("<div/>").text(res.message).html();
 
 Review comment:
   Can you use a non-jquery function? We have [escpeHtml](https://github.com/ZxMYS/incubator-airflow/blob/xzhu/linkify/airflow/www/static/js/base.js#L34-L37) function

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services