Skip to content

Commit df1a049

Browse files
committed
Fixed regex flaws
1 parent 0aba09c commit df1a049

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

hypha/apply/funds/views/revisions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def cleanse_stream_fields(self, a_field, b_field) -> List[str]:
155155
for field in (a_field, b_field):
156156
# TODO: Using regex with HTML is not ideal but this temp until we move to xml parsing
157157
field_match = re.match(
158-
r"^\s*<section class=\".*\">\s*(<h2 class=\".*\">(?:\s|.)*?</h2>)((?:\s|.)*)</section>",
158+
r"^\s*<section class=\".*\">\s*(<h2 class=\".*\">[\s\S]*?</h2>)([\s\S]*?)</section>",
159159
field,
160160
)
161161
try:

0 commit comments

Comments
 (0)