Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
937a80d8
Commit
937a80d8
authored
Aug 28, 2020
by
Kev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix convertUnicodeToAscii text utility method
parent
caae0ec3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
app/assets/javascripts/lib/utils/text_utility.js
app/assets/javascripts/lib/utils/text_utility.js
+2
-2
spec/frontend/lib/utils/text_utility_spec.js
spec/frontend/lib/utils/text_utility_spec.js
+2
-1
No files found.
app/assets/javascripts/lib/utils/text_utility.js
View file @
937a80d8
...
...
@@ -283,7 +283,7 @@ const unicodeConversion = [
[
/
[
ÌÍÎÏĨĪĬĮİ
]
/g
,
'
I
'
],
[
/
[
Ððĥħ
]
/g
,
'
h
'
],
[
/
[
ÑŃŅŇʼn
]
/g
,
'
N
'
],
[
/
[
ÒÓÔÕ
Ö
ØŌŎŐ
]
/g
,
'
O
'
],
[
/
[
ÒÓÔÕØŌŎŐ
]
/g
,
'
O
'
],
[
/
[
ÙÚÛŨŪŬŮŰŲ
]
/g
,
'
U
'
],
[
/
[
ÝŶŸ
]
/g
,
'
Y
'
],
[
/
[
Þñþńņň
]
/g
,
'
n
'
],
...
...
@@ -293,7 +293,7 @@ const unicodeConversion = [
[
/
[
çćĉċč
]
/g
,
'
c
'
],
[
/
[
èéêëēĕėęě
]
/g
,
'
e
'
],
[
/
[
ìíîïĩīĭį
]
/g
,
'
i
'
],
[
/
[
òóôõ
ö
øōŏő
]
/g
,
'
o
'
],
[
/
[
òóôõøōŏő
]
/g
,
'
o
'
],
[
/
[
ùúûũūŭůűų
]
/g
,
'
u
'
],
[
/
[
ýÿŷ
]
/g
,
'
y
'
],
[
/
[
ĎĐ
]
/g
,
'
D
'
],
...
...
spec/frontend/lib/utils/text_utility_spec.js
View file @
937a80d8
...
...
@@ -218,10 +218,11 @@ describe('text_utility', () => {
it
(
'
replaces Unicode characters
'
,
()
=>
{
expect
(
textUtils
.
convertUnicodeToAscii
(
'
Dĭd söméònê äšk fœŕ Ůnĭċődę?
'
)).
toBe
(
'
Did someone aesk foer Unicode?
'
,
'
Did so
e
meone aesk foer Unicode?
'
,
);
expect
(
textUtils
.
convertUnicodeToAscii
(
"
Jürgen's Projekt
"
)).
toBe
(
"
Juergen's Projekt
"
);
expect
(
textUtils
.
convertUnicodeToAscii
(
'
öäüÖÄÜ
'
)).
toBe
(
'
oeaeueOeAeUe
'
);
});
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment