From 32a97eb306f2f7d74aae02fa0369b3c56f22df8f Mon Sep 17 00:00:00 2001 From: Dominik Jain Date: Fri, 9 Jan 2026 18:21:34 +0100 Subject: [PATCH] Do not overwrite input variable for flexibility --- src/serena/text_utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/serena/text_utils.py b/src/serena/text_utils.py index 3c62e30a..c36dce78 100644 --- a/src/serena/text_utils.py +++ b/src/serena/text_utils.py @@ -408,15 +408,15 @@ def search_files( return matches -def render_html(text: str) -> str: +def render_html(html: str) -> str: """ Remove HTML tags and decode HTML entities from text while preserving the actual content. This keeps type information and structure but removes all formatting. - :param text: HTML text to clean + :param html: HTML text to clean :return: Plain text without HTML tags and with decoded entities """ - soup = BeautifulSoup(text, "html.parser") + soup = BeautifulSoup(html, "html.parser") # join text with spaces to avoid concatenation of words text = soup.get_text(separator=" ", strip=True)