Skip to content


Subversion checkout URL

You can clone with
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: aaronsw/html2text
base: 8ae9193a02
head fork: aaronsw/html2text
compare: c654527042
  • 2 commits
  • 1 file changed
  • 0 commit comments
  • 2 contributors
Commits on Nov 16, 2012
@adhiraj adhiraj Add semicolon to style data for safety
If the style data does not contain a semicolon, the loop removing @import
statements will run infinitely, because the search for ';' returns -1, which
with a +1 becomes 0, and appends the data variable to itself. Making sure the
data variable has at least one semicolon fixes this problem.
Commits on Nov 19, 2012
@aaronsw Merge pull request #62 from adhiraj/import_sentence
Add semicolon to style data for safety
Showing with 1 addition and 0 deletions.
  1. +1 −0 
1 
@@ -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:]

No commit comments for this range

Something went wrong with that request. Please try again.