Skip to content

Commit

Permalink
HTML escape payload from error messages. Closes #392
Browse files Browse the repository at this point in the history
  • Loading branch information
Johannes Ernst authored and jernst committed Oct 19, 2024
1 parent 7897e84 commit 2811f6a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/feditest/testruntranscript.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import traceback
from abc import ABC, abstractmethod
from datetime import datetime
import html
from typing import IO, Iterator, Optional

import jinja2
Expand Down Expand Up @@ -562,7 +563,8 @@ def session_file_path(plan_session):
local_name_with_tooltip=lambda n: f'<span title="{ n }">{ n.split(".")[-1] }</span>',
format_timestamp=lambda ts: ts.strftime("%Y:%m:%d-%H:%M:%S.%fZ") if ts else "",
format_duration=lambda s: str(s), # makes it easier to change in the future
len=len
len=len,
html_escape=lambda s: html.escape(str(s))
)

try:
Expand Down

0 comments on commit 2811f6a

Please sign in to comment.