New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyError 'href' for HTML anchors #32

Closed
zopyx opened this Issue Jan 7, 2019 · 2 comments

Comments

Projects
None yet
2 participants
@zopyx
Copy link
Member

zopyx commented Jan 7, 2019

HTML containing an anchor like <a name=".."> causes this error because the code expects that every a element has a href attribute.

  File "/home/ajung/sandboxes/onkopedia_buildout-plone5/eggs/plone.outputfilters-3.1.0-py3.6.egg/plone/outputfilters/__init__.py", line 7, in apply_filters
    res = filter(data)
  File "/home/ajung/sandboxes/onkopedia_buildout-plone5/eggs/plone.outputfilters-3.1.0-py3.6.egg/plone/outputfilters/filters/resolveuid_and_caption.py", line 117, in __call__
    href = attributes['href']
KeyError: 'href'
@zopyx

This comment has been minimized.

Copy link
Member

zopyx commented Jan 7, 2019

Fixed on master

0c61404

@zopyx zopyx closed this Jan 7, 2019

@mauritsvanrees

This comment has been minimized.

Copy link
Member

mauritsvanrees commented Jan 7, 2019

Thanks, the fix looks good.
But please do this in a pull request next time. Then the Jenkins jobs can be run to check for unforeseen errors. And after merging the PR, the coredev buildout is updated automatically to checkout this package. I have done that manually now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment