Skip to content
Browse files

Merge pull request #62 from adhiraj/import_sentence

Add semicolon to style data for safety
  • Loading branch information...
2 parents 8ae9193 + 65a540b commit c654527042f401ec661266e74d90d101ba3eb506 @aaronsw committed
Showing with 1 addition and 0 deletions.
  1. +1 −0 html2text.py
View
1 html2text.py
@@ -110,6 +110,7 @@ def dumb_property_dict(style):
def dumb_css_parser(data):
"""returns a hash of css selectors, each of which contains a hash of css attributes"""
# remove @import sentences
+ data += ';'
importIndex = data.find('@import')
while importIndex != -1:
data = data[0:importIndex] + data[data.find(';', importIndex) + 1:]

0 comments on commit c654527

Please sign in to comment.
Something went wrong with that request. Please try again.