This is an automated email from the ASF dual-hosted git repository.
jedcunningham pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 665b005f1c Revert "Make links in logs as hyperlinks in grid view
(#36816)" (#36826)
665b005f1c is described below
commit 665b005f1ce1dbcddd0cdc64484fbb06f8294eda
Author: Jed Cunningham <[email protected]>
AuthorDate: Tue Jan 16 15:46:20 2024 -0700
Revert "Make links in logs as hyperlinks in grid view (#36816)" (#36826)
This reverts commit af6ae954476ab45fd5776f76f27b2668eb868aef. This
introduces at least some html injection from task logs.
---
airflow/www/static/js/dag/details/taskInstance/Logs/LogBlock.tsx | 2 +-
airflow/www/static/js/dag/details/taskInstance/Logs/utils.ts | 6 ------
2 files changed, 1 insertion(+), 7 deletions(-)
diff --git a/airflow/www/static/js/dag/details/taskInstance/Logs/LogBlock.tsx
b/airflow/www/static/js/dag/details/taskInstance/Logs/LogBlock.tsx
index dad3fda391..f92e8a80a4 100644
--- a/airflow/www/static/js/dag/details/taskInstance/Logs/LogBlock.tsx
+++ b/airflow/www/static/js/dag/details/taskInstance/Logs/LogBlock.tsx
@@ -73,7 +73,7 @@ const LogBlock = ({ parsedLogs, wrap, tryNumber }: Props) => {
borderRadius={3}
borderColor="blue.500"
>
- <div dangerouslySetInnerHTML={{ __html: parsedLogs }} />
+ {parsedLogs}
<div ref={codeBlockBottomDiv} />
</Code>
);
diff --git a/airflow/www/static/js/dag/details/taskInstance/Logs/utils.ts
b/airflow/www/static/js/dag/details/taskInstance/Logs/utils.ts
index f4bc67a14d..80b534ccd5 100644
--- a/airflow/www/static/js/dag/details/taskInstance/Logs/utils.ts
+++ b/airflow/www/static/js/dag/details/taskInstance/Logs/utils.ts
@@ -97,12 +97,6 @@ export const parseLogs = (
line.includes(fileSourceFilter)
)
) {
- // If there are any links, make them hyperlinks
- parsedLine = parsedLine.replace(
- /((https?:\/\/|http:\/\/)[^\s]+)/g,
- '<a href="$1" target="_blank" style="color: blue; text-decoration:
underline;">$1</a>'
- );
-
parsedLines.push(parsedLine);
}
});