#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'
Change History (2)
comment:1 Changed 18 years ago by cmlenz
- Resolution set to fixed
- Status changed from new to closed
comment:2 Changed 18 years ago by cmlenz
- Priority changed from major to minor
Note: See
TracTickets for help on using
tickets.

Fixed in [771]. Thanks!