openverse
openverse copied to clipboard
Add a check to prevent insecure links in the documentation
Current Situation
https://github.com/WordPress/openverse/issues/3266
It's possible to add insecure links to the documentation and easy to miss.
Suggested Improvement
We can add a check of some sort (linter or custom Sphinx extension or, if a Sphinx extension exists, a pre-built one, though I couldn't find one) to alert if we accidentally add an insecure link to the documentation.
We can also add a small CSS rule to highlight these cases:
a[href*="http://"] {
border: 3px solid red;
}
The CSS adds a red border around insecure direct links. It intentionally ignores relative links under the assumption the protocol should already indicate a secure connection.
Benefit
Prevent accidentally adding insecure links.