amoghrajesh commented on code in PR #36829:
URL: https://github.com/apache/airflow/pull/36829#discussion_r1464286997


##########
airflow/www/static/js/dag/details/taskInstance/Logs/utils.ts:
##########
@@ -97,7 +99,30 @@ export const parseLogs = (
         line.includes(fileSourceFilter)
       )
     ) {
-      parsedLines.push(parsedLine);
+      // sanitize the lines to remove any tags that may cause HTML injection
+      const sanitizedLine = sanitizeHtml(parsedLine, {
+        allowedTags: ["a"],
+        allowedAttributes: {
+          a: ["href", "target", "style"],
+        },
+        transformTags: {
+          a: (tagName: any, attribs: { style: string }) => {

Review Comment:
   You are correct, made the change and it did take the types type implicitly
   



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to