From ed2ca6af79d7ac92e59dc6d8c17e6e963e8f192b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 19 Jan 2022 14:32:15 +0100 Subject: [PATCH 01/18] CSS --- htdocs/theme/eldy/global.inc.php | 23 +++++++++++--- htdocs/theme/md/btn.inc.php | 1 + htdocs/theme/md/main_menu_fa_icons.inc.php | 2 +- htdocs/theme/md/style.css.php | 18 ++++++++--- htdocs/website/index.php | 36 +++++++++++++--------- 5 files changed, 55 insertions(+), 25 deletions(-) diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 164fc74bc35..0ffc4e84786 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -1888,7 +1888,7 @@ div.blockvmenulogo margin-left: 11px; margin-right: 9px; padding: 0; - height: px; + height: px; /* width: 100px; */ max-width: 100px; vertical-align: middle; @@ -4936,6 +4936,11 @@ tr.visible { /* Module website */ /* ============================================================================== */ +.websiteformtoolbar { + position: sticky; + top: ; +} + .exampleapachesetup { overflow-y: auto; height: 100px; @@ -4988,7 +4993,13 @@ span[phptag] { /* display: inline-block; */ padding-: 10px; vertical-align: middle; - /* line-height: 28px; */ + line-height: 28px; +} +.websiteselectionsection { + font-size: 0.85em; +} +.websiteselection span { + vertical-align: middle; } .websitetools { float: right; @@ -5000,7 +5011,7 @@ span[phptag] { } .websiteinputurl { display: inline-block; - vertical-align: top; + vertical-align: middle; line-height: 28px; } .websiteiframenoborder { @@ -5035,6 +5046,10 @@ span.websitebuttonsitepreviewdisabled img, a.websitebuttonsitepreviewdisabled im line-height: 1em; } +.websitebar input.bordertransp { + line-height: normal !important; +} + #divbodywebsite section p { margin: unset; } @@ -7340,7 +7355,7 @@ div.clipboardCPValue.hidewithsize { .websiteselectionsection { border-left: unset; - boerder-right: unset; + border-right: unset; padding-left: 5px; } diff --git a/htdocs/theme/md/btn.inc.php b/htdocs/theme/md/btn.inc.php index 17ab4d83f28..a593f6ecdbf 100644 --- a/htdocs/theme/md/btn.inc.php +++ b/htdocs/theme/md/btn.inc.php @@ -234,6 +234,7 @@ span.butActionNewRefused>span.fa, span.butActionNewRefused>span.fa:hover background: var(--butactiondeletebg); /* border: 1px solid #633; */ color: #633; + vertical-align: middle; } .butActionDelete:hover { diff --git a/htdocs/theme/md/main_menu_fa_icons.inc.php b/htdocs/theme/md/main_menu_fa_icons.inc.php index d234ff15d4a..b8f45808293 100644 --- a/htdocs/theme/md/main_menu_fa_icons.inc.php +++ b/htdocs/theme/md/main_menu_fa_icons.inc.php @@ -11,7 +11,7 @@ font-variant: normal; text-rendering: auto; line-height: 26px; - font-size: 1.5em; + font-size: 1.3em; -webkit-font-smoothing: antialiased; text-align:center; text-decoration:none; diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 0257ca2465c..1d794d60de1 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -3041,11 +3041,11 @@ div.blockvmenulogo border-bottom: 0 !important; } .menulogocontainer { - margin: px; + margin: px; margin-left: 12px; margin-right: 6px; padding: 0; - height: px; + height: px; /* width: 100px; */ max-width: 100px; vertical-align: middle; @@ -4862,6 +4862,11 @@ tr.visible { /* Module website */ /* ============================================================================== */ +.websiteformtoolbar { + position: sticky; + top: ; +} + .exampleapachesetup { overflow-y: auto; max-height: 100px; @@ -4891,7 +4896,10 @@ span[phptag] { border-bottom: 1px solid #ccc; background: #eee; display: inline-block; - padding: 4px 0 4px 0; + padding: 5px 5px 5px 5px; +} +.centpercent.websitebar { + width: calc(100% - 10px); } .websitebar .buttonDelete, .websitebar .button { text-shadow: none; @@ -4908,7 +4916,7 @@ span[phptag] { } .websiteselection { /* display: inline-block; */ - padding-left: 10px; + padding-: 10px; vertical-align: middle; } .websitetools { @@ -7126,7 +7134,7 @@ div.clipboardCPValue.hidewithsize { .websiteselectionsection { border-left: unset; - boerder-right: unset; + border-right: unset; padding-left: 5px; } diff --git a/htdocs/website/index.php b/htdocs/website/index.php index cdadc2c3eba..af2f3a96ae1 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -2508,7 +2508,7 @@ llxHeader($moreheadcss.$moreheadjs, $langs->trans("WebsiteSetup"), $helpurl, '', print "\n"; print ''."\n"; -print '
'; +print ''; print ''; print ''; @@ -2669,7 +2669,7 @@ if (!GETPOST('hide_websitemenu')) { print '   '; //print ''; - print ''.dol_escape_htmltag($langs->trans($conf->dol_optimize_smallscreen ? "Properties" : "EditCss")).''; + print ''.dol_escape_htmltag($langs->trans("EditCss")).''; $importlabel = $langs->trans("ImportSite"); $exportlabel = $langs->trans("ExportSite"); @@ -2692,24 +2692,24 @@ if (!GETPOST('hide_websitemenu')) { print ''; // Regenerate all pages - print 'ref.'" class="button bordertransp"'.$disabled.' title="'.dol_escape_htmltag($langs->trans("RegenerateWebsiteContent")).'">'; + print 'ref.'" class="button bordertransp"'.$disabled.' title="'.dol_escape_htmltag($langs->trans("RegenerateWebsiteContent")).'">'; // Generate site map - print 'ref.'" class="button bordertransp"'.$disabled.' title="'.dol_escape_htmltag($langs->trans("GenerateSitemaps")).'">'; + print 'ref.'" class="button bordertransp"'.$disabled.' title="'.dol_escape_htmltag($langs->trans("GenerateSitemaps")).'">'; - print 'ref.'" class="button bordertransp"'.$disabled.' title="'.dol_escape_htmltag($langs->trans("ReplaceWebsiteContent")).'">'; + print 'ref.'" class="button bordertransp"'.$disabled.' title="'.dol_escape_htmltag($langs->trans("ReplaceWebsiteContent")).'">'; } print ''; if ($websitekey && $websitekey != '-1' && ($action == 'preview' || $action == 'createfromclone' || $action == 'createpagefromclone' || $action == 'deletesite')) { print ''; - //print 'ref.'" class="button bordertransp"'.$disabled.' title="'.dol_escape_htmltag($langs->trans("MediaFiles")).'">'; - print dolButtonToOpenUrlInDialogPopup('file_manager', $langs->transnoentitiesnoconv("MediaFiles"), '', '/website/index.php?action=file_manager&website='.$website->ref, $disabled); + //print 'ref.'" class="button bordertransp"'.$disabled.' title="'.dol_escape_htmltag($langs->trans("MediaFiles")).'">'; + print dolButtonToOpenUrlInDialogPopup('file_manager', $langs->transnoentitiesnoconv("MediaFiles"), '', '/website/index.php?action=file_manager&website='.$website->ref, $disabled); if (!empty($conf->categorie->enabled)) { - //print ''; - print dolButtonToOpenUrlInDialogPopup('categories', $langs->transnoentitiesnoconv("Categories"), '', '/categories/index.php?leftmenu=website&nosearch=1&type=website_page&website='.$website->ref, $disabled); + //print ''; + print dolButtonToOpenUrlInDialogPopup('categories', $langs->transnoentitiesnoconv("Categories"), '', '/categories/index.php?leftmenu=website&nosearch=1&type=website_page&website='.$website->ref, $disabled); } print ''; @@ -2808,7 +2808,7 @@ if (!GETPOST('hide_websitemenu')) { print ''; print ''; - print 'ref.'" class="button bordertransp"'.$disabled.' title="'.dol_escape_htmltag($langs->trans("AddPage")).'">'; + print 'ref.'" class="button bordertransp"'.$disabled.' title="'.dol_escape_htmltag($langs->trans("AddPage")).'">'; print ''; //print ''; @@ -2846,9 +2846,10 @@ if (!GETPOST('hide_websitemenu')) { print $langs->trans("New"); } - //print ''; - print ''; + print ''; + + print ''; // Print nav arrows $pagepreviousid = 0; @@ -2887,6 +2888,8 @@ if (!GETPOST('hide_websitemenu')) { print ''.img_next($langs->trans("Next")).''; } + print ''; + $websitepage = new WebSitePage($db); if ($pageid > 0 && ($action == 'preview' || $action == 'createfromclone' || $action == 'createpagefromclone')) { $websitepage->fetch($pageid); @@ -2962,13 +2965,16 @@ if (!GETPOST('hide_websitemenu')) { print $formconfirm; } + print ''; + print '   '; //print ''; - print ''.dol_escape_htmltag($langs->trans($conf->dol_optimize_smallscreen ? "Properties" : "EditPageMeta")).''; + print ''.dol_escape_htmltag($langs->trans("EditPageMeta")).''; //print ''; print ''.dol_escape_htmltag($langs->trans($conf->dol_optimize_smallscreen ? "HTML" : "EditHTMLSource")).''; + print ''; print ''."\n"; print '
'; @@ -3055,11 +3061,11 @@ if (!GETPOST('hide_websitemenu')) { //$disabled=' disabled="disabled"'; //print ''; //print ''; - print ''; + print ''; } else { //$disabled=''; //print ''; - print 'ref.'&pageid='.$pageid.'" class="button bordertransp"'.$disabled.' title="'.dol_escape_htmltag($langs->trans("SetAsHomePage")).'">'; + print 'ref.'&pageid='.$pageid.'" class="button bordertransp"'.$disabled.' title="'.dol_escape_htmltag($langs->trans("SetAsHomePage")).'">'; } print ''; print ''; From 60b90056c4a5ea0a2b15931325b76aa6afe96f61 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 19 Jan 2022 15:20:10 +0100 Subject: [PATCH 02/18] Fix #yogosha8450 --- htdocs/adherents/partnership.php | 21 ------------------- htdocs/admin/const.php | 2 -- htdocs/admin/defaultvalues.php | 2 +- htdocs/comm/mailing/card.php | 12 +++++------ htdocs/compta/facture/class/facture.class.php | 6 +++--- htdocs/compta/tva/card.php | 5 +++-- htdocs/core/customreports.php | 2 +- htdocs/core/lib/functions.lib.php | 2 +- htdocs/core/tpl/admin_extrafields_add.tpl.php | 2 +- .../conferenceorboothattendee_note.php | 1 - htdocs/externalsite/admin/index.php | 4 ++-- htdocs/hrm/position.php | 1 - htdocs/main.inc.php | 2 +- htdocs/modulebuilder/index.php | 2 +- .../template/scripts/mymodule.php | 1 - htdocs/public/onlinesign/newonlinesign.php | 2 -- htdocs/public/ticket/create_ticket.php | 2 +- htdocs/salaries/card.php | 2 +- htdocs/salaries/paiement_salary.php | 4 ++-- htdocs/user/card.php | 2 +- htdocs/viewimage.php | 2 +- test/phpunit/CodingPhpTest.php | 19 +++++++++++++++++ 22 files changed, 45 insertions(+), 53 deletions(-) diff --git a/htdocs/adherents/partnership.php b/htdocs/adherents/partnership.php index cf0e11d70e0..160a037c187 100644 --- a/htdocs/adherents/partnership.php +++ b/htdocs/adherents/partnership.php @@ -22,27 +22,6 @@ * \brief Page to create/edit/view partnership */ -//if (! defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); // Do not create database handler $db -//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER', '1'); // Do not load object $user -//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); // Do not load object $mysoc -//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); // Do not load object $langs -//if (! defined('NOSCANGETFORINJECTION')) define('NOSCANGETFORINJECTION', '1'); // Do not check injection attack on GET parameters -//if (! defined('NOSCANPOSTFORINJECTION')) define('NOSCANPOSTFORINJECTION', '1'); // Do not check injection attack on POST parameters -//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); // Do not check CSRF attack (test on referer + on token if option MAIN_SECURITY_CSRF_WITH_TOKEN is on). -//if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) -//if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK', '1'); // Do not check style html tag into posted data -//if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); // If there is no need to load and show top and left menu -//if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); // If we don't need to load the html.form.class.php -//if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); // Do not load ajax.lib.php library -//if (! defined("NOLOGIN")) define("NOLOGIN", '1'); // If this page is public (can be called outside logged session). This include the NOIPCHECK too. -//if (! defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip -//if (! defined("MAIN_LANG_DEFAULT")) define('MAIN_LANG_DEFAULT', 'auto'); // Force lang to a particular value -//if (! defined("MAIN_AUTHENTICATION_MODE")) define('MAIN_AUTHENTICATION_MODE', 'aloginmodule'); // Force authentication handler -//if (! defined("NOREDIRECTBYMAINTOLOGIN")) define('NOREDIRECTBYMAINTOLOGIN', 1); // The main.inc.php does not make a redirect if not logged, instead show simple error message -//if (! defined("FORCECSP")) define('FORCECSP', 'none'); // Disable all Content Security Policies -//if (! defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN', '1'); // Force use of CSRF protection with tokens even for GET -//if (! defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); // Disable browser notification - // Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; diff --git a/htdocs/admin/const.php b/htdocs/admin/const.php index a632d5f1a41..1426c323c01 100644 --- a/htdocs/admin/const.php +++ b/htdocs/admin/const.php @@ -37,8 +37,6 @@ if (!$user->admin) { $rowid = GETPOST('rowid', 'int'); $entity = GETPOST('entity', 'int'); $action = GETPOST('action', 'aZ09'); -$update = GETPOST('update', 'alpha'); -$delete = GETPOST('delete', 'none'); // Do not use alpha here $debug = GETPOST('debug', 'int'); $consts = GETPOST('const', 'array'); $constname = GETPOST('constname', 'alphanohtml'); diff --git a/htdocs/admin/defaultvalues.php b/htdocs/admin/defaultvalues.php index 4d88675ffd4..58a72250d64 100644 --- a/htdocs/admin/defaultvalues.php +++ b/htdocs/admin/defaultvalues.php @@ -64,7 +64,7 @@ if (!$sortorder) { $defaulturl = GETPOST('defaulturl', 'alphanohtml'); $defaultkey = GETPOST('defaultkey', 'alphanohtml'); -$defaultvalue = GETPOST('defaultvalue', 'none'); +$defaultvalue = GETPOST('defaultvalue', 'restricthtml'); $defaulturl = preg_replace('/^\//', '', $defaulturl); diff --git a/htdocs/comm/mailing/card.php b/htdocs/comm/mailing/card.php index 7f2410da136..79faf4b2cd2 100644 --- a/htdocs/comm/mailing/card.php +++ b/htdocs/comm/mailing/card.php @@ -493,9 +493,9 @@ if (empty($reshook)) { if ($action == 'add') { $mesgs = array(); - $object->email_from = (string) GETPOST("from", "none"); // Must allow 'name ' - $object->email_replyto = (string) GETPOST("replyto", "none"); // Must allow 'name ' - $object->email_errorsto = (string) GETPOST("errorsto", "none"); // Must allow 'name ' + $object->email_from = (string) GETPOST("from", 'alphawithlgt'); // Must allow 'name ' + $object->email_replyto = (string) GETPOST("replyto", 'alphawithlgt'); // Must allow 'name ' + $object->email_errorsto = (string) GETPOST("errorsto", 'alphawithlgt'); // Must allow 'name ' $object->title = (string) GETPOST("title"); $object->sujet = (string) GETPOST("sujet"); $object->body = (string) GETPOST("bodyemail", 'restricthtml'); @@ -531,11 +531,11 @@ if (empty($reshook)) { if ($action == 'settitle') { $object->title = trim(GETPOST('title', 'alpha')); } elseif ($action == 'setemail_from') { - $object->email_from = trim(GETPOST('email_from', 'none')); // Must allow 'name ' + $object->email_from = trim(GETPOST('email_from', 'alphawithlgt')); // Must allow 'name ' } elseif ($action == 'setemail_replyto') { - $object->email_replyto = trim(GETPOST('email_replyto', 'none')); // Must allow 'name ' + $object->email_replyto = trim(GETPOST('email_replyto', 'alphawithlgt')); // Must allow 'name ' } elseif ($action == 'setemail_errorsto') { - $object->email_errorsto = trim(GETPOST('email_errorsto', 'none')); // Must allow 'name ' + $object->email_errorsto = trim(GETPOST('email_errorsto', 'alphawithlgt')); // Must allow 'name ' } elseif ($action == 'settitle' && empty($object->title)) { $mesg = $langs->trans("ErrorFieldRequired", $langs->transnoentities("MailTitle")); } elseif ($action == 'setfrom' && empty($object->email_from)) { diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 74d08ddef2a..63fee0085bb 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -527,9 +527,9 @@ class Facture extends CommonInvoice // Fields coming from GUI (priority on template). TODO Value of template should be used as default value on GUI so we can use here always value from GUI $this->fk_project = GETPOST('projectid', 'int') > 0 ? ((int) GETPOST('projectid', 'int')) : $_facrec->fk_project; - $this->note_public = GETPOST('note_public', 'none') ? GETPOST('note_public', 'restricthtml') : $_facrec->note_public; - $this->note_private = GETPOST('note_private', 'none') ? GETPOST('note_private', 'restricthtml') : $_facrec->note_private; - $this->model_pdf = GETPOST('model', 'alpha') ? GETPOST('model', 'alpha') : $_facrec->model_pdf; + $this->note_public = GETPOSTISSET('note_public') ? GETPOST('note_public', 'restricthtml') : $_facrec->note_public; + $this->note_private = GETPOSTISSET('note_private') ? GETPOST('note_private', 'restricthtml') : $_facrec->note_private; + $this->model_pdf = GETPOSTISSET('model') ? GETPOST('model', 'alpha') : $_facrec->model_pdf; $this->cond_reglement_id = GETPOST('cond_reglement_id', 'int') > 0 ? ((int) GETPOST('cond_reglement_id', 'int')) : $_facrec->cond_reglement_id; $this->mode_reglement_id = GETPOST('mode_reglement_id', 'int') > 0 ? ((int) GETPOST('mode_reglement_id', 'int')) : $_facrec->mode_reglement_id; $this->fk_account = GETPOST('fk_account') > 0 ? ((int) GETPOST('fk_account')) : $_facrec->fk_account; diff --git a/htdocs/compta/tva/card.php b/htdocs/compta/tva/card.php index 530d18d17f9..317838009c7 100644 --- a/htdocs/compta/tva/card.php +++ b/htdocs/compta/tva/card.php @@ -196,7 +196,8 @@ if ($action == 'add' && !$cancel) { } $object->amount = $amount; $object->label = GETPOST("label", 'alpha'); - $object->note = GETPOST("note", 'none'); + $object->note = GETPOST("note", 'restricthtml'); + $object->note_private = GETPOST("note", 'restricthtml'); if (empty($object->datep)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("DatePayment")), null, 'errors'); @@ -236,7 +237,7 @@ if ($action == 'add' && !$cancel) { $paiement->amounts = array($object->id=>$amount); // Tableau de montant $paiement->paiementtype = GETPOST("type_payment", 'alphanohtml'); $paiement->num_payment = GETPOST("num_payment", 'alphanohtml'); - $paiement->note = GETPOST("note", 'none'); + $paiement->note = GETPOST("note", 'restricthtml'); if (!$error) { $paymentid = $paiement->create($user, (int) GETPOST('closepaidtva')); diff --git a/htdocs/core/customreports.php b/htdocs/core/customreports.php index e380dea8403..fafd1c015e8 100644 --- a/htdocs/core/customreports.php +++ b/htdocs/core/customreports.php @@ -56,7 +56,7 @@ if (!defined('USE_CUSTOM_REPORT_AS_INCLUDE')) { } $search_yaxis = GETPOST('search_yaxis', 'array'); - $search_graph = GETPOST('search_graph', 'none'); + $search_graph = GETPOST('search_graph', 'restricthtml'); // Load variable for pagination $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 28a20ad6b09..535eb7f226e 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -641,7 +641,7 @@ function GETPOST($paramname, $check = 'alphanohtml', $method = 0, $filter = null } // Check rule - if (preg_match('/^array/', $check)) { // If 'array' or 'array:restricthtml' or 'array:aZ09' + if (preg_match('/^array/', $check)) { // If 'array' or 'array:restricthtml' or 'array:aZ09' or 'array:intcomma' if (!is_array($out) || empty($out)) { $out = array(); } else { diff --git a/htdocs/core/tpl/admin_extrafields_add.tpl.php b/htdocs/core/tpl/admin_extrafields_add.tpl.php index d9c0f650395..9b46fba6c67 100644 --- a/htdocs/core/tpl/admin_extrafields_add.tpl.php +++ b/htdocs/core/tpl/admin_extrafields_add.tpl.php @@ -185,7 +185,7 @@ $listofexamplesforlink = 'Societe:societe/class/societe.class.php
Contact:con textwithpicto($langs->trans("ComputedFormula"), $langs->trans("ComputedFormulaDesc")).$form->textwithpicto($langs->trans("Computedpersistent"), $langs->trans("ComputedpersistentDesc"), 1, 'warning'); ?> - + trans("DefaultValue").' ('.$langs->trans("Database").')'; ?> diff --git a/htdocs/eventorganization/conferenceorboothattendee_note.php b/htdocs/eventorganization/conferenceorboothattendee_note.php index 19d413daaa0..b8fb87d39fa 100644 --- a/htdocs/eventorganization/conferenceorboothattendee_note.php +++ b/htdocs/eventorganization/conferenceorboothattendee_note.php @@ -39,7 +39,6 @@ //if (! defined("MAIN_LANG_DEFAULT")) define('MAIN_LANG_DEFAULT', 'auto'); // Force lang to a particular value //if (! defined("MAIN_AUTHENTICATION_MODE")) define('MAIN_AUTHENTICATION_MODE', 'aloginmodule'); // Force authentication handler //if (! defined("NOREDIRECTBYMAINTOLOGIN")) define('NOREDIRECTBYMAINTOLOGIN', 1); // The main.inc.php does not make a redirect if not logged, instead show simple error message -//if (! defined("FORCECSP")) define('FORCECSP', 'none'); // Disable all Content Security Policies //if (! defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN', '1'); // Force use of CSRF protection with tokens even for GET //if (! defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); // Disable browser notification diff --git a/htdocs/externalsite/admin/index.php b/htdocs/externalsite/admin/index.php index ba23b88e68e..0b55a297be9 100644 --- a/htdocs/externalsite/admin/index.php +++ b/htdocs/externalsite/admin/index.php @@ -57,7 +57,7 @@ if ($action == 'update') { $label = GETPOST('EXTERNALSITE_LABEL', 'alphanohtml'); // exturl can be an url or a HTML string - $exturl = GETPOST('EXTERNALSITE_URL', 'none'); + $exturl = GETPOST('EXTERNALSITE_URL', 'restricthtml'); $exturl = dol_string_onlythesehtmltags($exturl, 1, 1, 0, 1); $exturl = dol_string_onlythesehtmlattributes($exturl); @@ -110,7 +110,7 @@ print ''; print ''.$langs->trans("ExternalSiteURL").""; print '