summaryrefslogtreecommitdiffstats
path: root/webapp/utils/url.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/utils/url.jsx')
-rw-r--r--webapp/utils/url.jsx5
1 files changed, 4 insertions, 1 deletions
diff --git a/webapp/utils/url.jsx b/webapp/utils/url.jsx
index 060d8256a..f1edf58c1 100644
--- a/webapp/utils/url.jsx
+++ b/webapp/utils/url.jsx
@@ -1,8 +1,11 @@
// Copyright (c) 2017-present Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
+import {latinise} from 'utils/latinise.jsx';
+
export function cleanUpUrlable(input) {
- var cleaned = input.trim().replace(/-/g, ' ').replace(/[^\w\s]/gi, '').toLowerCase().replace(/\s/g, '-');
+ var cleaned = latinise(input);
+ cleaned = cleaned.trim().replace(/-/g, ' ').replace(/[^\w\s]/gi, '').toLowerCase().replace(/\s/g, '-');
cleaned = cleaned.replace(/-{2,}/, '-');
cleaned = cleaned.replace(/^-+/, '');
cleaned = cleaned.replace(/-+$/, '');