Commit Graph

8 Commits (ae8bbb814f16c2dc2a82e88d408bee1812ceda9c)

Author SHA1 Message Date
Mustafa Can Elmacı ae8bbb814f treewide: HTML Cleanup
* HTML Cleanup: Meta tags.
* Converted charset to shorthand.
* Removed meta tags with `Content-Script-Type` attribute. (Invalid in HTML5 spec.)

* HTML Cleanup: CSS tags.
* 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

* HTML Cleanup: Convert from XHTML to HTML5
* Removed XML declaration.
* Removed XML namespace.
* Changed doctype to HTML5.

* HTML Cleanup: CDATA tags.
* 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

* HTML Cleanup: Script tags.
* 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ı <mustafacan@elmaci.net>
2024-11-22 22:39:46 +01:00
Daniel Nilsson 72255eb46c luci-app-commands: correctly pass custom arguments as query string
Commit 702c007 changed the request to be invoked via the Request.get function
instead of the deprecated XHR one. The request options object requires the
query string to be located inside of the subobject "query", otherwise they are
not picked up. This resulted in breaking the custom arguments functionality as
the input would simply be ignored.

Fixes #7255

Signed-off-by: Daniel Nilsson <dannil+github@protonmail.com>
2024-09-18 23:24:03 +02:00
Jo-Philipp Wich 702c007365 luci-app-commands: avoid deprecated XHR() usage
Replace direct usage of deprecated XHR() wrapper with L.request class calls.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2024-07-28 01:36:22 +02:00
Jo-Philipp Wich 0f9c168fa6 luci-app-commands: move URL building to client side
Replace server side dispatcher.build_url() with client side L.url() calls.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2024-07-28 01:14:46 +02:00
Jo-Philipp Wich 385129bd51 luci-app-commands: use client side translation in JavaScript blocks
Do not interpolate translated strings on the server side, use browser
side translation calls instead to avoid potential quote escaping issues.

Fixes: #7213
Fixes: 119fd22ebf ("luci-app-commands: replace i18n single quotes with double-quotes")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2024-07-28 01:08:01 +02:00
Jo-Philipp Wich 1021ecef10 Revert "luci-app-commands: replace i18n single quotes with double-quotes"
This reverts commit 119fd22ebf.

The commit is ineffective and does not solve the reported issue.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2024-07-28 00:21:24 +02:00
Paul Donald 119fd22ebf luci-app-commands: replace i18n single quotes with double-quotes
Closes #7213

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2024-07-27 21:56:02 +02:00
Jo-Philipp Wich dd1c538b2e luci-app-commands: rewrite to client side rendering
Rewrite the luci-app-command configuration to client side cbi forms and
port the server side templates and controller logic to ucode.

Also utilize a query string parameter to pass custom arguments.

Fixes: #5559
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-10-25 01:03:38 +02:00