Skip to content

Commit

Permalink
Remove more chars
Browse files Browse the repository at this point in the history
  • Loading branch information
gunnarvelle committed Nov 26, 2024
1 parent 3982982 commit 31e26f3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main/java/no/ndla/taxonomy/util/PrettyUrlUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ private static String cleanString(String name) {
return Jsoup.parse(name)
.text()
.toLowerCase()
.replaceAll("[.,!?()/«»'¡:`’#°π€%&|]", "")
.replaceAll("[.,!?()/«»\"'¡:`’#°π€%&|]", "")
.replaceAll("[æåäáǎāà]", "a")
.replaceAll("[øöôóòõ]", "o")
.replaceAll("[ïíǐīìĩ]", "i")
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/no/ndla/taxonomy/util/PrettyUrlUtilTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ void test_create_pretty_url_with_punctuation() {
assertEquals(
"/r/this-is-a-title---with-long-dash/hash",
PrettyUrlUtil.createPrettyUrl(
Optional.empty(), "This is a «title» – with long dash", "hash", NodeType.RESOURCE)
Optional.empty(), "This is a «title» – with \"long\" dash", "hash", NodeType.RESOURCE)
.get());
assertEquals(
"/r/pytagoras-setning/hash",
PrettyUrlUtil.createPrettyUrl(Optional.empty(), "Pytagoras’ setning", "hash", NodeType.RESOURCE)
PrettyUrlUtil.createPrettyUrl(Optional.empty(), "Pytagoras’ setning", "hash", NodeType.RESOURCE)
.get());
assertEquals(
"/r/empezamos-ya/hash",
Expand Down

0 comments on commit 31e26f3

Please sign in to comment.