Skip to content

Commit b8a88fe

Browse files
[WIKI-599] chore: removed the regex tags calculation in description (#7608)
1 parent 409ac30 commit b8a88fe

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

apps/api/plane/utils/content_validator.py

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -187,24 +187,6 @@ def validate_html_content(html_content):
187187
f"HTML content contains dangerous JavaScript in event handler: {handler_content[:100]}",
188188
)
189189

190-
# Basic HTML structure validation - check for common malformed tags
191-
try:
192-
# Count opening and closing tags for basic structure validation
193-
opening_tags = re.findall(r"<(\w+)[^>]*>", html_content)
194-
closing_tags = re.findall(r"</(\w+)>", html_content)
195-
196-
# Filter out self-closing tags from opening tags
197-
opening_tags_filtered = [
198-
tag for tag in opening_tags if tag.lower() not in SELF_CLOSING_TAGS
199-
]
200-
201-
# Basic check - if we have significantly more opening than closing tags, it might be malformed
202-
if len(opening_tags_filtered) > len(closing_tags) + 10: # Allow some tolerance
203-
return False, "HTML content appears to be malformed (unmatched tags)"
204-
205-
except Exception:
206-
# If HTML parsing fails, we'll allow it
207-
pass
208190

209191
return True, None
210192

0 commit comments

Comments
 (0)