From 972216ad8502a27017285c0db0813fb860c448a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mustafa=20Can=20Elmac=C4=B1?= Date: Thu, 7 Nov 2024 18:25:19 +0300 Subject: [PATCH 1/5] HTML Cleanup: Script tags. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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ı --- .../usr/lib/lua/luci/view/admin_status/index/bmx7_nodes.htm | 4 ++-- .../root/usr/lib/lua/luci/view/bmx7/nodes_j.htm | 6 +++--- .../root/usr/lib/lua/luci/view/bmx7/status_j.htm | 6 +++--- .../root/usr/lib/lua/luci/view/bmx7/topology.htm | 2 +- .../root/usr/lib/lua/luci/view/bmx7/tunnels_j.htm | 6 +++--- applications/luci-app-commands/ucode/template/commands.ut | 2 +- applications/luci-app-cshark/luasrc/view/cshark.htm | 2 +- .../luasrc/view/dockerman/apply_widget.htm | 2 +- .../luci-app-dockerman/luasrc/view/dockerman/container.htm | 2 +- .../luasrc/view/dockerman/container_console.htm | 2 +- .../luasrc/view/dockerman/container_file.htm | 2 +- .../luasrc/view/dockerman/container_stats.htm | 2 +- .../luasrc/view/dockerman/images_import.htm | 2 +- .../luasrc/view/dockerman/images_load.htm | 2 +- .../luasrc/view/dockerman/newcontainer_resolve.htm | 2 +- .../luci-app-ltqtapi/luasrc/view/telephony_status.htm | 2 +- applications/luci-app-lxc/luasrc/view/lxc.htm | 2 +- applications/luci-app-nft-qos/luasrc/view/nft-qos/rate.htm | 2 +- applications/luci-app-ocserv/luasrc/view/ocserv_status.htm | 2 +- .../luci-app-olsr-viz/root/usr/libexec/rpcd/olsrvizinfo | 2 +- .../luasrc/view/openvpn/cbi-select-input-add.htm | 2 +- .../luci-app-privoxy/luasrc/view/privoxy/detail_logview.htm | 2 +- .../luasrc/view/privoxy/detail_startstop.htm | 2 +- .../luasrc/view/radicale/btn_startstop.htm | 2 +- .../luasrc/view/radicale/tabmap_nsections.htm | 2 +- applications/luci-app-radicale2/luasrc/view/cbi/raduigo.htm | 2 +- .../luci-app-splash/luasrc/view/admin_status/splash.htm | 2 +- docs/LuCI-0.10.md | 2 +- libs/luci-lib-nixio/axTLS/www/index.html | 6 +++--- modules/luci-base/ucode/template/footer.ut | 4 ++-- modules/luci-base/ucode/template/header.ut | 6 +++--- modules/luci-base/ucode/template/sysauth.ut | 2 +- modules/luci-base/ucode/template/view.ut | 2 +- modules/luci-compat/luasrc/view/cbi/delegator.htm | 2 +- modules/luci-compat/luasrc/view/cbi/footer.htm | 2 +- modules/luci-compat/luasrc/view/cbi/ipaddr.htm | 2 +- modules/luci-compat/luasrc/view/cbi/simpleform.htm | 2 +- modules/luci-compat/luasrc/view/cbi/wireless_modefreq.htm | 4 ++-- .../luci-mod-status/ucode/template/admin_status/index.ut | 4 ++-- .../ucode/template/themes/bootstrap/footer.ut | 2 +- .../ucode/template/themes/bootstrap/header.ut | 2 +- .../ucode/template/themes/bootstrap/sysauth.ut | 2 +- .../ucode/template/themes/material/footer.ut | 2 +- .../ucode/template/themes/openwrt2020/footer.ut | 2 +- .../ucode/template/themes/openwrt2020/header.ut | 4 ++-- .../ucode/template/themes/openwrt.org/footer.ut | 2 +- .../ucode/template/themes/openwrt.org/header.ut | 4 ++-- 47 files changed, 63 insertions(+), 63 deletions(-) diff --git a/applications/luci-app-bmx7/root/usr/lib/lua/luci/view/admin_status/index/bmx7_nodes.htm b/applications/luci-app-bmx7/root/usr/lib/lua/luci/view/admin_status/index/bmx7_nodes.htm index 32a3a965cef9..e408db85a9b7 100644 --- a/applications/luci-app-bmx7/root/usr/lib/lua/luci/view/admin_status/index/bmx7_nodes.htm +++ b/applications/luci-app-bmx7/root/usr/lib/lua/luci/view/admin_status/index/bmx7_nodes.htm @@ -18,8 +18,8 @@ - - + - + + - diff --git a/applications/luci-app-dockerman/luasrc/view/dockerman/container_file.htm b/applications/luci-app-dockerman/luasrc/view/dockerman/container_file.htm index 46d4278cf7b9..53f2c84f66d6 100644 --- a/applications/luci-app-dockerman/luasrc/view/dockerman/container_file.htm +++ b/applications/luci-app-dockerman/luasrc/view/dockerman/container_file.htm @@ -15,7 +15,7 @@ - + ``` diff --git a/libs/luci-lib-nixio/axTLS/www/index.html b/libs/luci-lib-nixio/axTLS/www/index.html index 9896cd8a5466..2b224a614143 100755 --- a/libs/luci-lib-nixio/axTLS/www/index.html +++ b/libs/luci-lib-nixio/axTLS/www/index.html @@ -1,7 +1,7 @@ - - - + + + diff --git a/modules/luci-compat/luasrc/view/cbi/footer.htm b/modules/luci-compat/luasrc/view/cbi/footer.htm index c72102340f55..3dc5c9a0ad82 100644 --- a/modules/luci-compat/luasrc/view/cbi/footer.htm +++ b/modules/luci-compat/luasrc/view/cbi/footer.htm @@ -36,6 +36,6 @@ - + <%+footer%> diff --git a/modules/luci-compat/luasrc/view/cbi/ipaddr.htm b/modules/luci-compat/luasrc/view/cbi/ipaddr.htm index d34d8d986590..b861e19e9b63 100644 --- a/modules/luci-compat/luasrc/view/cbi/ipaddr.htm +++ b/modules/luci-compat/luasrc/view/cbi/ipaddr.htm @@ -1,5 +1,5 @@ <%+cbi/valueheader%> - + diff --git a/modules/luci-compat/luasrc/view/cbi/wireless_modefreq.htm b/modules/luci-compat/luasrc/view/cbi/wireless_modefreq.htm index f81ee19614e1..08d729cee1e3 100644 --- a/modules/luci-compat/luasrc/view/cbi/wireless_modefreq.htm +++ b/modules/luci-compat/luasrc/view/cbi/wireless_modefreq.htm @@ -1,6 +1,6 @@ <%+cbi/valueheader%> - + <%+cbi/valuefooter%> diff --git a/modules/luci-mod-status/ucode/template/admin_status/index.ut b/modules/luci-mod-status/ucode/template/admin_status/index.ut index 4d018a3efdca..2e71a2872d09 100644 --- a/modules/luci-mod-status/ucode/template/admin_status/index.ut +++ b/modules/luci-mod-status/ucode/template/admin_status/index.ut @@ -12,7 +12,7 @@
{{ _('Loading view…') }}
- + {% endif %} diff --git a/themes/luci-theme-bootstrap/ucode/template/themes/bootstrap/header.ut b/themes/luci-theme-bootstrap/ucode/template/themes/bootstrap/header.ut index a6d2936a5f41..222d19eadfe7 100644 --- a/themes/luci-theme-bootstrap/ucode/template/themes/bootstrap/header.ut +++ b/themes/luci-theme-bootstrap/ucode/template/themes/bootstrap/header.ut @@ -20,7 +20,7 @@ {{ striptags(`${boardinfo.hostname ?? '?'}${node ? ` - ${node.title}` : ''}`) }} - LuCI {% if (!darkpref): %} - + diff --git a/themes/luci-theme-openwrt-2020/ucode/template/themes/openwrt2020/footer.ut b/themes/luci-theme-openwrt-2020/ucode/template/themes/openwrt2020/footer.ut index 5899f2a9dda2..6d165f15021f 100644 --- a/themes/luci-theme-openwrt-2020/ucode/template/themes/openwrt2020/footer.ut +++ b/themes/luci-theme-openwrt-2020/ucode/template/themes/openwrt2020/footer.ut @@ -10,7 +10,7 @@ Powered by {{ version.luciname }} ({{ version.luciversion }})

- + diff --git a/themes/luci-theme-openwrt-2020/ucode/template/themes/openwrt2020/header.ut b/themes/luci-theme-openwrt-2020/ucode/template/themes/openwrt2020/header.ut index 3857bce723a8..4545323fa063 100644 --- a/themes/luci-theme-openwrt-2020/ucode/template/themes/openwrt2020/header.ut +++ b/themes/luci-theme-openwrt-2020/ucode/template/themes/openwrt2020/header.ut @@ -21,8 +21,8 @@ - - + + {{ striptags(`${boardinfo.hostname ?? '?'}${node ? ` - ${node.title}` : ''}`) }} - LuCI {% if (css): %} diff --git a/themes/luci-theme-openwrt/ucode/template/themes/openwrt.org/footer.ut b/themes/luci-theme-openwrt/ucode/template/themes/openwrt.org/footer.ut index 1b6bfff5bbaa..12249ed75e50 100644 --- a/themes/luci-theme-openwrt/ucode/template/themes/openwrt.org/footer.ut +++ b/themes/luci-theme-openwrt/ucode/template/themes/openwrt.org/footer.ut @@ -12,7 +12,7 @@ Powered by {{ version.luciname }} ({{ version.luciversion }})

- + diff --git a/themes/luci-theme-openwrt/ucode/template/themes/openwrt.org/header.ut b/themes/luci-theme-openwrt/ucode/template/themes/openwrt.org/header.ut index 9f9e75d532f9..3dc6b422c112 100644 --- a/themes/luci-theme-openwrt/ucode/template/themes/openwrt.org/header.ut +++ b/themes/luci-theme-openwrt/ucode/template/themes/openwrt.org/header.ut @@ -26,8 +26,8 @@ {% if (css): %} {% endif %} - - + + {{ striptags(`${boardinfo.hostname ?? '?'}${node ? ` - ${_(node.title)}` : ''}`) }} - LuCI From de39b84d7902449eb5fda836b39b1c6b09b94140 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mustafa=20Can=20Elmac=C4=B1?= Date: Thu, 7 Nov 2024 18:33:39 +0300 Subject: [PATCH 2/5] HTML Cleanup: CDATA tags. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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ı --- .../usr/lib/lua/luci/view/admin_status/index/bmx7_nodes.htm | 4 ++-- .../root/usr/lib/lua/luci/view/bmx7/nodes_j.htm | 4 ++-- .../root/usr/lib/lua/luci/view/bmx7/status_j.htm | 4 ++-- .../root/usr/lib/lua/luci/view/bmx7/tunnels_j.htm | 4 ++-- applications/luci-app-commands/ucode/template/commands.ut | 4 ++-- applications/luci-app-cshark/luasrc/view/cshark.htm | 4 ++-- .../luasrc/view/dockerman/apply_widget.htm | 4 ++-- .../luasrc/view/dockerman/container_stats.htm | 4 ++-- .../luci-app-ltqtapi/luasrc/view/telephony_status.htm | 4 ++-- applications/luci-app-lxc/luasrc/view/lxc.htm | 2 -- applications/luci-app-nft-qos/luasrc/view/nft-qos/rate.htm | 4 ++-- applications/luci-app-ocserv/luasrc/view/ocserv_status.htm | 4 ++-- .../luasrc/view/openvpn/cbi-select-input-add.htm | 2 -- .../luci-app-privoxy/luasrc/view/privoxy/detail_logview.htm | 4 ++-- .../luasrc/view/privoxy/detail_startstop.htm | 4 ++-- .../luasrc/view/radicale/btn_startstop.htm | 4 ++-- .../luci-app-splash/luasrc/view/admin_status/splash.htm | 4 ++-- libs/luci-lib-nixio/axTLS/www/index.html | 6 ------ modules/luci-base/ucode/template/sysauth.ut | 4 ++-- modules/luci-compat/luasrc/view/cbi/wireless_modefreq.htm | 4 ++-- .../luci-mod-status/ucode/template/admin_status/index.ut | 4 ++-- 21 files changed, 36 insertions(+), 46 deletions(-) diff --git a/applications/luci-app-bmx7/root/usr/lib/lua/luci/view/admin_status/index/bmx7_nodes.htm b/applications/luci-app-bmx7/root/usr/lib/lua/luci/view/admin_status/index/bmx7_nodes.htm index e408db85a9b7..c8ddb2d8e8f6 100644 --- a/applications/luci-app-bmx7/root/usr/lib/lua/luci/view/admin_status/index/bmx7_nodes.htm +++ b/applications/luci-app-bmx7/root/usr/lib/lua/luci/view/admin_status/index/bmx7_nodes.htm @@ -19,7 +19,7 @@ - + diff --git a/applications/luci-app-bmx7/root/usr/lib/lua/luci/view/bmx7/nodes_j.htm b/applications/luci-app-bmx7/root/usr/lib/lua/luci/view/bmx7/nodes_j.htm index b3d278ea3c4b..bbbeb52c0e63 100644 --- a/applications/luci-app-bmx7/root/usr/lib/lua/luci/view/bmx7/nodes_j.htm +++ b/applications/luci-app-bmx7/root/usr/lib/lua/luci/view/bmx7/nodes_j.htm @@ -88,7 +88,7 @@

Mesh nodes

- + <%+footer%> diff --git a/applications/luci-app-bmx7/root/usr/lib/lua/luci/view/bmx7/status_j.htm b/applications/luci-app-bmx7/root/usr/lib/lua/luci/view/bmx7/status_j.htm index 7e6a33557dbc..bfabf1ea5014 100644 --- a/applications/luci-app-bmx7/root/usr/lib/lua/luci/view/bmx7/status_j.htm +++ b/applications/luci-app-bmx7/root/usr/lib/lua/luci/view/bmx7/status_j.htm @@ -87,7 +87,7 @@ - + <%+footer%> diff --git a/applications/luci-app-bmx7/root/usr/lib/lua/luci/view/bmx7/tunnels_j.htm b/applications/luci-app-bmx7/root/usr/lib/lua/luci/view/bmx7/tunnels_j.htm index 7db0380ec527..9b99cdd32523 100644 --- a/applications/luci-app-bmx7/root/usr/lib/lua/luci/view/bmx7/tunnels_j.htm +++ b/applications/luci-app-bmx7/root/usr/lib/lua/luci/view/bmx7/tunnels_j.htm @@ -50,7 +50,7 @@

Gateway announcements

- + <%+footer%> diff --git a/applications/luci-app-commands/ucode/template/commands.ut b/applications/luci-app-commands/ucode/template/commands.ut index 1ec5cbc4e9ae..4e831504dff4 100644 --- a/applications/luci-app-commands/ucode/template/commands.ut +++ b/applications/luci-app-commands/ucode/template/commands.ut @@ -28,7 +28,7 @@ ` }); -%} - + {% const commands = []; diff --git a/applications/luci-app-cshark/luasrc/view/cshark.htm b/applications/luci-app-cshark/luasrc/view/cshark.htm index 642468374d76..a90c75b074d0 100644 --- a/applications/luci-app-cshark/luasrc/view/cshark.htm +++ b/applications/luci-app-cshark/luasrc/view/cshark.htm @@ -82,7 +82,7 @@
- + diff --git a/applications/luci-app-dockerman/luasrc/view/dockerman/apply_widget.htm b/applications/luci-app-dockerman/luasrc/view/dockerman/apply_widget.htm index 4f89d47639c6..e3adf45ad3b4 100644 --- a/applications/luci-app-dockerman/luasrc/view/dockerman/apply_widget.htm +++ b/applications/luci-app-dockerman/luasrc/view/dockerman/apply_widget.htm @@ -42,7 +42,7 @@ } - + diff --git a/applications/luci-app-dockerman/luasrc/view/dockerman/container_stats.htm b/applications/luci-app-dockerman/luasrc/view/dockerman/container_stats.htm index caa9ad726742..28eaadab44a6 100644 --- a/applications/luci-app-dockerman/luasrc/view/dockerman/container_stats.htm +++ b/applications/luci-app-dockerman/luasrc/view/dockerman/container_stats.htm @@ -1,4 +1,4 @@ - + diff --git a/applications/luci-app-ltqtapi/luasrc/view/telephony_status.htm b/applications/luci-app-ltqtapi/luasrc/view/telephony_status.htm index f7e2edfd3799..645d5c3ca0b9 100644 --- a/applications/luci-app-ltqtapi/luasrc/view/telephony_status.htm +++ b/applications/luci-app-ltqtapi/luasrc/view/telephony_status.htm @@ -1,4 +1,4 @@ - +
<%:Current Telephony State%> diff --git a/applications/luci-app-lxc/luasrc/view/lxc.htm b/applications/luci-app-lxc/luasrc/view/lxc.htm index 7b76f787658f..69025ad6d392 100644 --- a/applications/luci-app-lxc/luasrc/view/lxc.htm +++ b/applications/luci-app-lxc/luasrc/view/lxc.htm @@ -65,7 +65,6 @@

<%:Create New Container%>


diff --git a/applications/luci-app-nft-qos/luasrc/view/nft-qos/rate.htm b/applications/luci-app-nft-qos/luasrc/view/nft-qos/rate.htm index 71fa08578682..8874e37ca173 100644 --- a/applications/luci-app-nft-qos/luasrc/view/nft-qos/rate.htm +++ b/applications/luci-app-nft-qos/luasrc/view/nft-qos/rate.htm @@ -5,7 +5,7 @@ <%+header%> - +

<%:Realtime Rate%>

diff --git a/applications/luci-app-ocserv/luasrc/view/ocserv_status.htm b/applications/luci-app-ocserv/luasrc/view/ocserv_status.htm index fe1ea8594917..b6212ec2c1f4 100644 --- a/applications/luci-app-ocserv/luasrc/view/ocserv_status.htm +++ b/applications/luci-app-ocserv/luasrc/view/ocserv_status.htm @@ -1,4 +1,4 @@ - +
<%:Active OpenConnect Users%> diff --git a/applications/luci-app-openvpn/luasrc/view/openvpn/cbi-select-input-add.htm b/applications/luci-app-openvpn/luasrc/view/openvpn/cbi-select-input-add.htm index f93da666b324..1753d2f69750 100644 --- a/applications/luci-app-openvpn/luasrc/view/openvpn/cbi-select-input-add.htm +++ b/applications/luci-app-openvpn/luasrc/view/openvpn/cbi-select-input-add.htm @@ -1,6 +1,5 @@ <%+openvpn/ovpn_css%> diff --git a/applications/luci-app-privoxy/luasrc/view/privoxy/detail_logview.htm b/applications/luci-app-privoxy/luasrc/view/privoxy/detail_logview.htm index cf8f78109b92..cfe32922f2d7 100644 --- a/applications/luci-app-privoxy/luasrc/view/privoxy/detail_logview.htm +++ b/applications/luci-app-privoxy/luasrc/view/privoxy/detail_logview.htm @@ -1,6 +1,6 @@ - + <%+cbi/valueheader%> diff --git a/applications/luci-app-privoxy/luasrc/view/privoxy/detail_startstop.htm b/applications/luci-app-privoxy/luasrc/view/privoxy/detail_startstop.htm index b428765a063a..459056e134bd 100644 --- a/applications/luci-app-privoxy/luasrc/view/privoxy/detail_startstop.htm +++ b/applications/luci-app-privoxy/luasrc/view/privoxy/detail_startstop.htm @@ -1,6 +1,6 @@ - + <%+cbi/valueheader%> diff --git a/applications/luci-app-radicale/luasrc/view/radicale/btn_startstop.htm b/applications/luci-app-radicale/luasrc/view/radicale/btn_startstop.htm index f749ab56d11f..3a472401d60c 100644 --- a/applications/luci-app-radicale/luasrc/view/radicale/btn_startstop.htm +++ b/applications/luci-app-radicale/luasrc/view/radicale/btn_startstop.htm @@ -1,6 +1,6 @@ - + <%+cbi/valueheader%> diff --git a/applications/luci-app-splash/luasrc/view/admin_status/splash.htm b/applications/luci-app-splash/luasrc/view/admin_status/splash.htm index 16085828d6bb..5c21aa03db1c 100644 --- a/applications/luci-app-splash/luasrc/view/admin_status/splash.htm +++ b/applications/luci-app-splash/luasrc/view/admin_status/splash.htm @@ -134,7 +134,7 @@ <%+header%> - +
diff --git a/libs/luci-lib-nixio/axTLS/www/index.html b/libs/luci-lib-nixio/axTLS/www/index.html index 2b224a614143..1387a3da7a3c 100755 --- a/libs/luci-lib-nixio/axTLS/www/index.html +++ b/libs/luci-lib-nixio/axTLS/www/index.html @@ -2,9 +2,7 @@ axTLS Embedded SSL - changes, notes and errata + {% endif %} From 9f29d622dc6ddf9cdc398f23b512826e30c7ae65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mustafa=20Can=20Elmac=C4=B1?= Date: Thu, 7 Nov 2024 19:29:53 +0300 Subject: [PATCH 5/5] HTML Cleanup: Meta tags. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Converted charset to shorthand. * Removed meta tags with `Content-Script-Type` attribute. (Invalid in HTML5 spec.) Signed-off-by: Mustafa Can Elmacı --- libs/luci-lib-nixio/axTLS/www/index.html | 2 +- .../ucode/template/themes/openwrt2020/header.ut | 3 +-- .../ucode/template/themes/openwrt.org/header.ut | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/libs/luci-lib-nixio/axTLS/www/index.html b/libs/luci-lib-nixio/axTLS/www/index.html index dbe356d502f3..deac5a6d78cb 100755 --- a/libs/luci-lib-nixio/axTLS/www/index.html +++ b/libs/luci-lib-nixio/axTLS/www/index.html @@ -34,7 +34,7 @@ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --> - + diff --git a/themes/luci-theme-openwrt-2020/ucode/template/themes/openwrt2020/header.ut b/themes/luci-theme-openwrt-2020/ucode/template/themes/openwrt2020/header.ut index 0d3804b6aa81..56443bd9cbb9 100644 --- a/themes/luci-theme-openwrt-2020/ucode/template/themes/openwrt2020/header.ut +++ b/themes/luci-theme-openwrt-2020/ucode/template/themes/openwrt2020/header.ut @@ -14,8 +14,7 @@ - - + diff --git a/themes/luci-theme-openwrt/ucode/template/themes/openwrt.org/header.ut b/themes/luci-theme-openwrt/ucode/template/themes/openwrt.org/header.ut index e766a8be3c58..b7a6abae6856 100644 --- a/themes/luci-theme-openwrt/ucode/template/themes/openwrt.org/header.ut +++ b/themes/luci-theme-openwrt/ucode/template/themes/openwrt.org/header.ut @@ -16,9 +16,8 @@ - + - {% if (node?.css): %}