Skip to content
This repository was archived by the owner on Sep 19, 2022. It is now read-only.

Commit 43b874a

Browse files
committed
Some IdPs has newline in a name, so remove it.
1 parent 4891e19 commit 43b874a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

www/protected/whitelistedIdps.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,15 @@ function getEntityName($metadata) {
4141
$displayName = $metadata['UIInfo']['DisplayName'];
4242
assert('is_array($displayName)'); // Should always be an array of language code -> translation
4343
if (!empty($displayName)) {
44-
return $displayName['en'];
44+
return preg_replace( "/\r|\n/", "", $displayName['en']);
4545
}
4646
}
4747
if (array_key_exists('name', $metadata)) {
4848
if (is_array($metadata['name'])) {
49-
return $metadata['name']['en'];
49+
return preg_replace( "/\r|\n/", "", $metadata['name']['en']);
5050
} else {
51-
return $metadata['name'];
51+
return preg_replace( "/\r|\n/", "", $metadata['name']);
5252
}
5353
}
5454
return $metadata['entityid'];
55-
}
55+
}

0 commit comments

Comments
 (0)