mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 18:14:17 +00:00
Fix code scanning alert no. 6: Incomplete string escaping or encoding
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
(cherry picked from commit 372444c50a
)
This commit is contained in:

committed by
github-actions[bot]
![github-actions[bot]](/assets/img/avatar_default.png)
parent
6198314a37
commit
bb84d86cf5
@@ -163,7 +163,7 @@ export class Metadata {
|
||||
const outputKeys: string[] = [];
|
||||
for (const inputKey of inputKeys) {
|
||||
if (inputKey.includes('*')) {
|
||||
const inputKeyRegex = new RegExp('^' + inputKey.replace(/\./g, '\\.').replace(/\*/g, '.*') + '$');
|
||||
const inputKeyRegex = new RegExp('^' + inputKey.replace(/\\/g, '\\\\').replace(/\./g, '\\.').replace(/\*/g, '.*') + '$');
|
||||
for (const mapKey of Object.keys(mdMap)) {
|
||||
if (!outputKeys.includes(mapKey) && inputKeyRegex.test(mapKey)) {
|
||||
outputKeys.push(mapKey);
|
||||
|
Reference in New Issue
Block a user