pqzx / html2docx

Convert html to docx
MIT License
69 stars 49 forks source link

parse_dict_string raising excemptions in edge cases #32

Open djplaner opened 2 years ago

djplaner commented 2 years ago

Hi,

FYI, the following line in parse_dict_string in h2d.py assumes that string x will only have 1 colon

string_dict = dict([x.split(':') for x in new_string if ':' in x])

I've had some HTML which break this assumption, with the following string - note the two colons background-image:url('https://....')

Sorry, no useful solution to offer. I'm simply catching and ignoring the exception to satisfy my short-term goals.

David.

pqzx commented 2 years ago

Thanks for picking this up. There is also no support yet for background-image (as in your example).