Skip to content

Commit

Permalink
Last ones i hope
Browse files Browse the repository at this point in the history
  • Loading branch information
gunnarvelle committed Nov 27, 2024
1 parent da00839 commit bc6d53d
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions src/main/java/no/ndla/taxonomy/util/PrettyUrlUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,20 @@ private static String cleanString(String name) {
return Jsoup.parse(name)
.text()
.toLowerCase()
.replaceAll("[.,!?()/«»\"”“'¡:`’#°π€%&|]", "")
.replaceAll("[æåäáǎāà]", "a")
.replaceAll("[øöôóòõ]", "o")
.replaceAll("[.,!?()/«»\"”“'¡:`’#°π€%&|]", "")
.replaceAll("[æååäáǎāàãâ]", "a")
.replaceAll("[øöôóòõǒ]", "o")
.replaceAll("[ïíǐīìĩ]", "i")
.replaceAll("[éèẽê]", "e")
.replaceAll("[šŝś]", "s")
.replaceAll("[éèẽêë]", "e")
.replaceAll("[šŝśş]", "s")
.replaceAll("[čĉć]", "c")
.replaceAll("[üùũú]", "u")
.replaceAll("1D45-B7C5", "d")
.replaceAll("[—–_:,]", "-")
.replaceAll("[üùũúû]", "u")
.replaceAll("ð", "d")
.replaceAll("ğ", "g")
.replaceAll("ž", "z")
.replaceAll("ß", "ss")
.replaceAll("₂", "2")
.replaceAll("[—–−_:,]", "-")
.trim();
}

Expand Down

0 comments on commit bc6d53d

Please sign in to comment.