From 3b25ad6de917338a6b5d8141fe771c352fb3cb9f Mon Sep 17 00:00:00 2001 From: Pavel Loginov Date: Tue, 1 Dec 2020 10:31:50 +0600 Subject: [PATCH] v4.5.4.0 Changelog: https://haproxy-wi.org/changelog.py#4_5_4 --- inc/add.js | 1 + inc/script.js | 8 ++++++++ inc/style.css | 26 ++++++++++++++++++++------ 3 files changed, 29 insertions(+), 6 deletions(-) diff --git a/inc/add.js b/inc/add.js index 09a9c668..a2beda36 100644 --- a/inc/add.js +++ b/inc/add.js @@ -1296,6 +1296,7 @@ function createList(color) { } else { list = $('#new_blacklist_name').val() } + list = escapeHtml(list); $.ajax( { url: "options.py", data: { diff --git a/inc/script.js b/inc/script.js index b4aa0d0c..dfdac81a 100644 --- a/inc/script.js +++ b/inc/script.js @@ -6,6 +6,14 @@ function validateEmail(email) { const re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; return re.test(email); } +function escapeHtml(unsafe) { + return unsafe + .replace(/&/g, "&") + .replace(//g, ">") + .replace(/"/g, """) + .replace(/'/g, "'"); +} var wait_mess = '
Please don\'t close and don\'t represh page. Wait until the work is completed. This may take some time
' $( function() { $('.menu li ul li').each(function () { diff --git a/inc/style.css b/inc/style.css index 07eb2491..7d45f828 100644 --- a/inc/style.css +++ b/inc/style.css @@ -87,7 +87,7 @@ pre { left: 0; z-index: 1000; display: block; - background-color: #222a31; + background-color: #18262e; font-size: 12px; } .logoText { @@ -357,7 +357,7 @@ pre { .overview-wi .overviewHead { border-bottom: 1px solid #A4C7F5; } -.overview tr{ +.overview tr{ border-bottom: 1px solid #ddd; border-radius: 5px; } @@ -472,7 +472,7 @@ ul{ font-size: 1.1em; } .menu a{ - background: #222a31; + background: #18262e; color: #fff; padding: 10px; display: block; @@ -569,9 +569,17 @@ ul{ padding-right: 10px !important; background: #f4f9f380 !important; } -.ui-checkboxradio-label { - padding-bottom: 0.6em !important; - padding-top: 0.6em !important; +@media all and (-webkit-min-device-pixel-ratio:0) and (min-resolution: .001dpcm) { + .ui-checkboxradio-label { + padding-bottom: 0.6em !important; + padding-top: 0.6em !important; + } +} +@-moz-document url-prefix() { + .ui-checkboxradio-label { + padding-bottom: 5px !important; + padding-top: 7.5px !important; + } } .ui-state-default { background-color: #EBF1F1 !important; @@ -842,6 +850,7 @@ label { } .update-icon { float: right; + margin-top: 5px; } .span-link { cursor: pointer; @@ -1168,3 +1177,8 @@ label { .stats_frontends { background-color: rgb(93, 156, 235) !important; } +.switcher_table_metric { + margin-left: 99%; + color: #a0d100; + cursor: pointer; +} \ No newline at end of file