Skip to content
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

invalid datetime attributes #6057

Closed
cfm opened this issue Aug 5, 2021 · 2 comments · Fixed by #6075
Closed

invalid datetime attributes #6057

cfm opened this issue Aug 5, 2021 · 2 comments · Fixed by #6075

Comments

@cfm
Copy link
Member

cfm commented Aug 5, 2021

Description

In securedrop/source_templates/lookup.html, time elements have invalid datetime attributes giving too many digits for fractional seconds.

Steps to Reproduce

Validate the HTML of the Source Interface's /lookup view.

Expected Behavior

The page validates.

Actual Behavior

The page fails validation with errors like:

Bad value 2021-07-13 22:47:04.564322 for attribute datetime on element time: A fraction of a second must be one, two, or three digits

Comments

Should be simple to fix with a truncating Jinja filter.

@anorthall
Copy link
Contributor

I have fixed this in #6058, however I used strftime() instead of the Jinja truncate feature, as you cannot truncate the datetime instance without first converting it to a string.

@zenmonkeykstop
Copy link
Contributor

Thanks to @cfm for finding this and @anorthall for picking it up! Will add a comment on the PR.

zenmonkeykstop pushed a commit that referenced this issue Aug 25, 2021
…dd new filter to templates (fixes #6057)

Add newline to end of template_filters.py

Remove locale argument from html_datetime_format

Remove surplus line breaks
@cfm cfm removed their assignment Sep 8, 2021
zenmonkeykstop pushed a commit that referenced this issue Sep 17, 2021
…dd new filter to templates (fixes #6057)

Add newline to end of template_filters.py

Remove locale argument from html_datetime_format

Remove surplus line breaks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants