Skip to content

Left angle bracket '<' with any characters (tag or not) and no closing right angle bracket prevents remaining text from being returned #544

@steffanboodhoo

Description

@steffanboodhoo

Given some text that contains a left angle bracket and no closing right angle bracket, the bleach.clean method returns nothing after the occurrence of the left angle bracket.

Consider the following example strings
example_str_1 = 'random prefix text <anything any amount of suffix text'
example_str_2 = '<e any amount of text here is gone'
example_str_3 = '<it works when there is a closing>'

Expected output
example_str_1 random prefix text &lt;anything any amount of suffix text
example_str_2 &lt;e any amount of text here is gone
example_str_3 &lt;it works when there is a closing right bracket&gt;

Actual output
example_str_1 random prefix text
example_str_2 empty string
example_str_3 &lt;it works when there is a closing right bracket&gt;

Python version 3.6.8
bleach 3.1.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions