html2docx icon indicating copy to clipboard operation
html2docx copied to clipboard

parse_dict_string raising excemptions in edge cases

Open djplaner opened this issue 3 years ago • 1 comments

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.

djplaner avatar Jan 11 '22 20:01 djplaner

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

pqzx avatar Mar 08 '22 07:03 pqzx