mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-25 11:38:44 +02:00
Merge remote-tracking branch 'origin/support/3.0' into develop
# Conflicts: # pages/UI.php # tests/php-unit-tests/unitary-tests/application/utilsTest.php
This commit is contained in:
@@ -480,7 +480,7 @@ class utils
|
||||
|
||||
// For URL
|
||||
case static::ENUM_SANITIZATION_FILTER_URL:
|
||||
$retValue = filter_var($value, FILTER_SANITIZE_URL);
|
||||
$retValue = filter_var($value, FILTER_VALIDATE_URL);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
@@ -592,8 +592,8 @@ try
|
||||
if ($sQuery !== $sFullText) {
|
||||
$sQueryLabel = $sFullText;
|
||||
}
|
||||
GlobalSearchHelper::AddQueryToHistory($sQuery, $sQueryIconUrl, $sQueryLabel);
|
||||
$oP->SetBlockParam('ibo-global-search.sQuery', $sQuery);
|
||||
GlobalSearchHelper::AddQueryToHistory(utils::EscapeHtml($sQuery), $sQueryIconUrl, $sQueryLabel);
|
||||
$oP->SetBlockParam('ibo-global-search.sQuery', utils::EscapeHtml($sQuery));
|
||||
|
||||
// Check the needle length
|
||||
$iMinLenth = MetaModel::GetConfig()->Get('full_text_needle_min');
|
||||
|
||||
@@ -55,7 +55,7 @@ try
|
||||
|
||||
if (array_key_exists('table_inner_id', $aListParams))
|
||||
{
|
||||
$sListId = $aListParams['table_inner_id'];
|
||||
$sListId = utils::HtmlEntities($aListParams['table_inner_id']);
|
||||
}
|
||||
|
||||
if (array_key_exists('json', $aListParams))
|
||||
|
||||
@@ -811,7 +811,7 @@ try {
|
||||
foreach ($aShortcutClasses as $cShortcutPlugin) {
|
||||
foreach ($cShortcutPlugin::GetShortcutKeys() as $aShortcutKey) {
|
||||
$sKey = utils::ReadParam($aShortcutKey['id'], $aShortcutKey['key'], true, 'raw_data');
|
||||
$aShortcutPrefs[$aShortcutKey['id']] = strtolower($sKey);
|
||||
$aShortcutPrefs[$aShortcutKey['id']] = strtolower(utils::HtmlEntities($sKey));
|
||||
}
|
||||
}
|
||||
appUserPreferences::SetPref('keyboard_shortcuts', $aShortcutPrefs);
|
||||
|
||||
@@ -830,7 +830,7 @@ class utilsTest extends ItopTestCase
|
||||
'good element_identifier' => [utils::ENUM_SANITIZATION_FILTER_ELEMENT_IDENTIFIER, 'AD05nb', 'AD05nb'],
|
||||
'bad element_identifier' => [utils::ENUM_SANITIZATION_FILTER_ELEMENT_IDENTIFIER, 'AD05nb+', 'AD05nb'],
|
||||
'good url' => [utils::ENUM_SANITIZATION_FILTER_URL, 'https://www.w3schools.com', 'https://www.w3schools.com'],
|
||||
'bad url' => [utils::ENUM_SANITIZATION_FILTER_URL, 'https://www.w3schoo<6F><6F>ls.co<63>m', 'https://www.w3schools.com'],
|
||||
'bad url' => [utils::ENUM_SANITIZATION_FILTER_URL, 'https://www.w3schoo<6F><6F>ls.co<63>m', null],
|
||||
'raw_data' => ['raw_data', '<Test>\s😃😃😃', '<Test>\s😃😃😃'],
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user