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

custom css upload crashes on media queries #505

Closed
luto opened this Issue Sep 18, 2018 · 1 comment

Comments

Projects
None yet
1 participant
@luto
Member

luto commented Sep 18, 2018

Expected Behavior

Any valid css should be accepted by the per-conference custom css setting/upload.

Current Behavior

@media print {
}

Uploading the above css crashes on saving:

File "pretalx/src/pretalx/orga/forms/event.py" in clean_custom_css
  42.                 validate_css(css.read())

File "pretalx/src/pretalx/common/css.py" in validate_css
  143.         style = rule.style

Exception Type: AttributeError at /orga/event/occon18/settings
Exception Value: 'CSSMediaRule' object has no attribute 'style'

Context

I tried to wip up a quick print css for #504.

Your Environment

  • Version used: master
  • Environment name and version (e.g. Chrome 39, python 3.5): N/A
  • Operating System and version (desktop or mobile): N/A
  • Link to your instance, if in production: N/A

@luto luto added the issue:bug label Sep 18, 2018

@rixx rixx closed this in a83342f Sep 18, 2018

@luto

This comment has been minimized.

Member

luto commented Sep 18, 2018

ha, you were faster ;) thanks! 🎉

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