Skip to content

Infinite loop on unclosed tags #25

@HakanIST

Description

@HakanIST

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions