Skip to content

Fix HTML validation errors in the templates - #205

Open
ArneshBanerjee wants to merge 1 commit into
sympy:sourcesfrom
ArneshBanerjee:fix-html-validation
Open

ArneshBanerjee wants to merge 1 commit into
sympy:sourcesfrom
ArneshBanerjee:fix-html-validation

Conversation

@ArneshBanerjee

@ArneshBanerjee ArneshBanerjee commented Sep 20, 2026 •

Copy link
Copy Markdown

Fixes #42.

Ran the generated pages through the Nu HTML validator. The errors were:

  • base.html: a stray quote in the Online Shell nav item, an unclosed "Follow Us" heading, and an unescaped | in the Google Fonts URL
  • features.html: nine stray </> end tags in the cryptography list
  • support.html, development.html, roadmap.html: lists wrapped in <p>
  • download.html, shell.html: <pre> wrapped in <p>
  • donate.html: unclosed <section id="get-started">
  • roadmap.html: <h1> closed with </h2>
  • development.html, roadmap.html: the sidebar card reused id="about", which base.html already uses
  • shell.html: empty iframe src, and width/height that are not integers
  • index.html: unescaped & in a link

features.html also had </a> inside a translatable string. The Dutch translation dropped it, so the link stayed open on the Dutch features page. The tag now sits in the template, and "Polynomials" on its own is already translated in every catalogue that had it.

All 81 generated pages now validate with no errors.

Two notes on the translations:

  • Only one msgid changed: the "General Improvements" paragraph in roadmap.html, which had a whole <ul> inside the translatable string. It is now a real list with the items translated separately. Spanish was the only language that had it translated, so I moved that text over in es.po and recompiled es.mo.
  • The rendered text is otherwise unchanged. I diffed the text content of every page before and after to check.

One thing to flag: the README says styling changes belong in sympy-web-static. The shell.html fix adds a small <style> block, because the iframe sizing was in width/height attributes that are not valid HTML. I kept it in the template so the fix is self-contained, but happy to move it to base.css in sympy-web-static and bump the submodule instead if you prefer.

The generated pages reported errors on the W3C validator:

- base.html: a stray quote in the Online Shell nav item, an unclosed
  "Follow Us" heading, and an unescaped "|" in the Google Fonts URL
- features.html: nine stray "</>" end tags in the cryptography list
- support.html, development.html, roadmap.html: lists wrapped in <p>
- download.html, shell.html: <pre> wrapped in <p>
- donate.html: unclosed <section id="get-started">
- roadmap.html: <h1> closed with </h2>
- development.html, roadmap.html: sidebar card reused id="about"
- shell.html: empty iframe src and non-integer width/height
- index.html: unescaped "&" in a link

features.html also had "</a>" inside a translatable string, and the Dutch
translation dropped it, which left the link open on the Dutch page. The
tag now sits in the template.

All 81 generated pages now parse with no errors.

Fixes sympy#42

This branch has not been deployed

No deployments
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.

Clear html from the validation errors.

1 participant