Ticket #150 (closed defect: fixed)
genshi.utils.striptags fails on Comments
| Reported by: | aronacher | Owned by: | cmlenz |
|---|---|---|---|
| Priority: | minor | Milestone: | 0.5 |
| Component: | General | Version: | 0.4.4 |
| Keywords: | Cc: |
Description
Minor issue, but it can be fixed. The striptags function fails for comments. Because SGML comment parsing is rather awkward it's probably enough to change the regexp to this:
r'(<!--.*?-->|<[^>]*>)'
Failing example:
>>> from genshi.util import striptags
>>> striptags('<!-- <blub>hehe</blah> -->test')
'hehe -->test'
Attachments
Change History
Note: See
TracTickets for help on using
tickets.
