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

Fix report template #804

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

hendzeld
Copy link

@hendzeld hendzeld commented Apr 4, 2024

Motivation

My colleague had issues with displaying generated reports:

The report was correctly displayed on:

  • my Linux/Firefox machine.
  • his Windows/Edge

The report had no content or even showed blank page on:

  • on his computer windows/firefox
  • on his computer windows/chrome

When I checked the generated report file I noticed that:

  • some tags were not properly closed
  • some special characters are not escaped properly

Issues

Examples

Misc

This PR also adds djlint to pre-commit hook.

Changes

Fixed

  • Fixed tags in report template.

Added

  • Added pre-commit hook to validate report template.

From djlint output:
H005 2:0 Html tag should have lang attribute. <html> <head>
H016 2:0 Missing title tag in html. <html> <head>
H030 2:0 Consider adding a meta description. <html> <head>
H031 2:0 Consider adding meta keywords. <html> <head>
H006 48:20 Img tag should have height and width attributes. <img src="" />
H013 48:20 Img tag should have an alt attribute. <img src="" />
H025 87:112 Tag seems to be an orphan. </span>

Linted 1 file, found 7 errors.
Removed extra  `/` that caused reporting of next </span> tag
@BeyondEvil
Copy link
Contributor

Nice!

Thank you for this!

@hendzeld
Copy link
Author

@BeyondEvil Do we need something more to merge?

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