Skip to content

fix html: Don't fail if a tag does not have some attributes. - #277

Merged
pbauer merged 1 commit into
mainfrom
thet/fix-html-fixes
Feb 13, 2026
Merged

fix html: Don't fail if a tag does not have some attributes.#277
pbauer merged 1 commit into
mainfrom
thet/fix-html-fixes

Conversation

@thet

@thet thet commented Feb 12, 2026

Copy link
Copy Markdown
Member

Fixes:

Traceback (most recent call last):
  File "/home/thet/.buildout/eggs/v5/collective.exportimport-1.15-py3.13-linux-x86_64.egg/collective/exportimport/fix_html.py", line 356, in fix_html_in_content_fields
    clean_text = fixer(clean_text, obj)
  File "/home/thet/.buildout/eggs/v5/collective.exportimport-1.15-py3.13-linux-x86_64.egg/collective/exportimport/fix_html.py", line 525, in img_variant_fixer
    classes = tag["class"]
              ~~~^^^^^^^^^
  File "/home/thet/.buildout/eggs/v5/beautifulsoup4-4.14.3-py3.13-linux-x86_64.egg/bs4/element.py", line 2401, in __getitem__
    return self.attrs[key]
           ~~~~~~~~~~^^^^^

@thet
thet force-pushed the thet/fix-html-fixes branch from 98fa106 to 90b1861 Compare February 12, 2026 21:37
@pbauer
pbauer merged commit acf82b5 into main Feb 13, 2026
9 checks passed
@thet
thet deleted the thet/fix-html-fixes branch February 13, 2026 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants