Skip to content

Commit

Permalink
fix(api): Improve the affiliations names normalization
Browse files Browse the repository at this point in the history
  • Loading branch information
annelhote committed Dec 6, 2023
1 parent 75a504f commit 2de356b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/src/utils/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ for (let i = 0; i < defaultDiacriticsRemovalMap.length; i += 1) {

// "what?" version ... http://jsperf.com/diacritics/12
// eslint-disable-next-line no-control-regex
const removeDiacritics = (str) => str.replace(/[^\u0000-\u007E]/g, (a) => diacriticsMap[a] || a).toLowerCase();
const removeDiacritics = (str) => str.replace(/[^\u0000-\u007E]/g, (a) => diacriticsMap[a] || a).replace(/[,%().*:;]/g, '').replace(/-/g, ' ').toLowerCase()
.trim();

export {
cleanId,
Expand Down

0 comments on commit 2de356b

Please sign in to comment.