Infinite loop on unclosed tags
convert_to_translatable_wikitext('Hello <div style="color:red">world') hangs indefinitely because wikitext.find('</div>', curr) returns -1 when no closing tag exists, making end_pattern = -1 + 6 = 5, which sends the cursor backwards into an infinite loop. The same unguarded find() pattern affects all 13 tag handlers in app.py.
Infinite loop on unclosed tags
convert_to_translatable_wikitext('Hello <div style="color:red">world')hangs indefinitely becausewikitext.find('</div>', curr)returns-1when no closing tag exists, makingend_pattern = -1 + 6 = 5, which sends the cursor backwards into an infinite loop. The same unguardedfind()pattern affects all 13 tag handlers inapp.py.