Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open bracket '<' still cleaned up without closing bracket #728

Open
alyohea opened this issue Mar 7, 2024 · 0 comments
Open

Open bracket '<' still cleaned up without closing bracket #728

alyohea opened this issue Mar 7, 2024 · 0 comments
Labels
untriaged Bug reports that haven't been triaged

Comments

@alyohea
Copy link

alyohea commented Mar 7, 2024

Describe the bug

Thanks for the fix provided #705!
I think I found regression after that fix

  • Python Version: [e.g. 3.9.6]
  • Bleach Version: [e.g. 6.1.0]

To Reproduce

Steps to reproduce the behavior:

# Working!
In [5]: bleach.clean("<test abc")
Out[5]: '&lt;test abc'
# Doesn't work (because of duplicated words?)
In [6]: bleach.clean("<test abc abc")
Out[6]: ''
# However this work
In [12]: bleach.clean("<test abc abd")
Out[12]: '&lt;test abc abd'
# Doesn't work (with space in the end)
In [7]: bleach.clean("<test abc ")
Out[7]: ''
# Doesn't work (with space in the end)
In [8]: bleach.clean("asd<test abc ")
Out[8]: 'asd'
# However this work
In [9]: bleach.clean("asd<test abc asd")
Out[9]: 'asd&lt;test abc asd'

Expected behavior

# Doesn't work (because of duplicated words?)
In [6]: bleach.clean("<test abc abc")
Out[6]: '&lt;test abc abc'
# Doesn't work (with space in the end)
In [7]: bleach.clean("<test abc ")
Out[7]: '&lt;test abc '
# Doesn't work (with space in the end)
In [8]: bleach.clean("asd<test abc ")
Out[8]: 'asd&lt;test abc '

Additional context

Add any other context about the problem here.

@alyohea alyohea added the untriaged Bug reports that haven't been triaged label Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
untriaged Bug reports that haven't been triaged
Projects
None yet
Development

No branches or pull requests

1 participant