From 458c04afa14a14ab7a790af930e400d9b69fc511 Mon Sep 17 00:00:00 2001 From: adrien Date: Sun, 20 Oct 2024 13:44:55 +0200 Subject: [PATCH] remove htmlentities --- filter_inputs.php | 2 +- index.php | 6 +++--- templates/hostsTable.xsl | 35 ++++----------------------------- templates/lib/toast.xsl | 42 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 50 insertions(+), 35 deletions(-) create mode 100644 templates/lib/toast.xsl diff --git a/filter_inputs.php b/filter_inputs.php index 3d1fdeb..920db09 100644 --- a/filter_inputs.php +++ b/filter_inputs.php @@ -7,7 +7,7 @@ $hostsListRegex = '/^[\da-zA-Z-.,:\/]+$/'; $protocolePortsListRegex = '/^(([TU]:)?[0-9\-]+|[a-z\-]+)(,([TU]:)?[0-9\-]+|,[a-z\-]+)*$/'; $portsListRegex = '/^([0-9\-]+|[a-z\-]+)(,[0-9\-]+|,[a-z\-]+)*$/'; $tempoRegex = '/^\d+[smh]?$/'; -$fileNameRegex = '/^[^<>:"\/|?]+$/'; +$fileNameRegex = '/^[^<>:\/|?]+$/'; $targets = filter_input(INPUT_GET, 'targets', FILTER_VALIDATE_REGEXP, ['options' => ['regexp' => $targetsListRegex], "flags" => FILTER_NULL_ON_FAILURE]); $preset = filter_input(INPUT_GET, "preset"); diff --git a/index.php b/index.php index 540e7af..d9a10fd 100755 --- a/index.php +++ b/index.php @@ -347,7 +347,7 @@ Exemples: /24 10. "> + value="">
@@ -467,7 +467,7 @@ foreach (scandir($SCANSDIR) as $filename) { "> + value="">
@@ -484,7 +484,7 @@ if (!file_exists($SCANSDIR)) { foreach (scandir($SCANSDIR) as $filename) { if (substr($filename, -4) == '.xml') { $name = str_replace('!', '/', substr_replace($filename, '', -4)); - echo "$name\n"; + echo "$name\n"; } } ?> diff --git a/templates/hostsTable.xsl b/templates/hostsTable.xsl index 4ad96f1..c9d69db 100755 --- a/templates/hostsTable.xsl +++ b/templates/hostsTable.xsl @@ -6,6 +6,7 @@ + @@ -162,37 +163,9 @@ table.order([1, 'asc']).draw() $('.ui.dropdown').dropdown() - -$.toast({ - title : '', - message : '', - showIcon : 'satellite dish', - displayTime: 0, - closeIcon : true, - position : 'bottom right', -}) - - -$.toast({ - title : '', - message : '', - showIcon : 'exclamation triangle', - class : 'error', - displayTime: 0, - closeIcon : true, - position : 'bottom right', -}) - - -$.toast({ - message : 'Comparaison avec les résultats du ', - class : 'info', - showIcon : 'calendar', - displayTime: 0, - closeIcon : true, - position : 'bottom right', -}) - + + + hiddenButton.onclick = function(event) { if (lanScanForm.checkValidity()) { diff --git a/templates/lib/toast.xsl b/templates/lib/toast.xsl new file mode 100644 index 0000000..966a69d --- /dev/null +++ b/templates/lib/toast.xsl @@ -0,0 +1,42 @@ + + + + + + +$.toast({ + title : '', + message : '', + showIcon : 'satellite dish', + displayTime: 0, + closeIcon : true, + position : 'bottom right', +}) + + +$.toast({ + title : '', + message : '', + showIcon : 'exclamation triangle', + class : 'error', + displayTime: 0, + closeIcon : true, + position : 'bottom right', +}) + + +$.toast({ + message : 'Comparaison avec les résultats du ', + class : 'info', + showIcon : 'calendar', + displayTime: 0, + closeIcon : true, + position : 'bottom right', +}) + + + + \ No newline at end of file