Skip to content

The urlize function does not compose parentheses correctly at the end #827

@colidyre

Description

@colidyre

Expected Behavior

Final parentheses should be within the tag and link should be exactly as given before filtering.

Actual Behavior

Final parentheses is outside the tag and final parentheses is lost in url construction

Template Code

from jinja2.utils import urlize
example_url = u'https://de.wikipedia.org/wiki/Agilit%C3%A4t_(Management)'
urlize(example_url, 50)
# u'<a href="https://de.wikipedia.org/wiki/Agilit%C3%A4t_(Management">https://de.wikipedia.org/wiki/Agilit%C3%A4t_(Manag...</a>)'

Your Environment

  • Python version: 2.7.12
  • Jinja version: 2.8

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions