def METHOD_NAME():
    """Truncating should not introduce xss issues."""
    s = 'safe <script>alert("omg")</script>'
    t = PurifiedTranslation(localized_string=s)
    actual = from_string('{{ s|truncate(100) }}').render({'s': t})
    assert actual == 'safe &lt;script&gt;alert("omg")&lt;/script&gt;'
    actual = from_string('{{ s|truncate(5) }}').render({'s': t})
    assert actual == 'safe ...'