-
Notifications
You must be signed in to change notification settings - Fork 104
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
remove_tags not working on html comments #158
Comments
I think there’s two parts here:
|
I meant the latter. Since the HTML comment tag is an HTML tag too, it would be nice to remove them when removing HTML tags are asked. The former would be a good output if it is accessible through a parameter. Anyway, the current output would not be considered an acceptable one. |
@mosynaq If we call from w3lib.html import remove_tags, remove_comments
raw = '<div><!--<A href="/mypage.htm">-->text</div>'
assert remove_tags(remove_comments(raw)) == "text" @Gallaecio If we consider HTML comments as tags we could just add a call to |
Thank you @Laerte. I close this issue. |
I want to
remove_tags
from'<div><!--<A href="/mypage.htm">-->text</div>'
. This is what I get as a result:'-->text'
, while'text'
is expected.The text was updated successfully, but these errors were encountered: