You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 <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 right bracket>
Actual output
example_str_1 random prefix text
example_str_2 empty string
example_str_3 <it works when there is a closing right bracket>
Python version 3.6.8
bleach 3.1.5
The text was updated successfully, but these errors were encountered:
…667)
The html5lib tokenizer kicks up a parse error token when there's a <
that isn't the start of a tag. This adds some handling for that case and
treats the < plus whatever is after it as characters data.
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 <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 right bracket>
Actual output
example_str_1
random prefix text
example_str_2 empty string
example_str_3
<it works when there is a closing right bracket>
Python version 3.6.8
bleach 3.1.5
The text was updated successfully, but these errors were encountered: