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

chore: HTML cleanup #7381

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

chore: HTML cleanup #7381

wants to merge 5 commits into from

Conversation

Rupurudu
Copy link

@Rupurudu Rupurudu commented Nov 7, 2024

I did bunch of HTML code cleanup on the repo.

Check commit messages for details.

  • [x ] This PR is not from my main or master branch 💩, but a separate branch ✅
  • [x ] Each commit has a valid ✒️ Signed-off-by: <[email protected]> row (via git commit --signoff)

* Removed `language` attribute from script tags. (No longer valid in HTML5)
* Removed `type` attribute with JavaScript MIME type from script tags. (HTML5 spec recommends omitting it.)

https://html.spec.whatwg.org/multipage/scripting.html#attr-script-type
https://mimesniff.spec.whatwg.org/#javascript-mime-type

Signed-off-by: Mustafa Can Elmacı <[email protected]>
* CDATA sections should not be used within HTML they are considered as comments and not displayed.

https://developer.mozilla.org/en-US/docs/Web/API/CDATASection

Signed-off-by: Mustafa Can Elmacı <[email protected]>
* Removed XML declaration.
* Removed XML namespace.
* Changed doctype to HTML5.

Signed-off-by: Mustafa Can Elmacı <[email protected]>
* Removed `type` attribute with CSS files from link tags. (HTML5 spec recommends omitting it.)
* Removed `type` attribute from style tags. (Deprecated in HTML5 spec.)

https://html.spec.whatwg.org/#attr-link-type
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/style

Signed-off-by: Mustafa Can Elmacı <[email protected]>
* Converted charset to shorthand.
* Removed meta tags with `Content-Script-Type` attribute. (Invalid in HTML5 spec.)

Signed-off-by: Mustafa Can Elmacı <[email protected]>
@Real-K5
Copy link

Real-K5 commented Nov 8, 2024

yes , that is a good chance to do it

@stokito
Copy link
Contributor

stokito commented Nov 14, 2024

Changes are ok, but we have CI that checks that commit messages are starting from the application/folder where the change made. That's why you see an error:

Commit subject line MUST start with ': ' (HTML Cleanup: Script tags.)

I hope that @systemcrash can anyway merge the changes.
If not then you'll need to add a prefix treewide: to all the commits.

@@ -192,5 +192,5 @@ Each theme must include this file in the `<head>` area of the document for forms
It should be included like this:

```html
<script type="text/javascript" src="<%=resource%>/xhr.js"></script>
<script src="<%=resource%>/xhr.js"></script>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JFYI: we also have a copy of the docs on Wiki https://github.com/openwrt/luci/wiki
So if it would be nice to update there too

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.

3 participants