diff --git a/public/js/commandline.js b/public/js/commandline.js
index 895fd124c..ee2b6e0af 100644
--- a/public/js/commandline.js
+++ b/public/js/commandline.js
@@ -603,7 +603,7 @@ $.getJSON("themes/list.json", function (data) {
data.forEach((theme) => {
commandsThemes.list.push({
id: "changeTheme" + capitalizeFirstLetter(theme.name),
- display: theme.name.replace("_", " "),
+ display: theme.name.replace(/_/g, " "),
hover: () => {
previewTheme(theme.name);
},
@@ -640,7 +640,7 @@ if (Object.keys(words).length > 0) {
if (language === "english_10k") return;
commandsLanguages.list.push({
id: "changeLanguage" + capitalizeFirstLetter(language),
- display: language.replace("_", " "),
+ display: language.replace(/_/g, " "),
exec: () => {
changeLanguage(language);
restartTest();
@@ -676,7 +676,7 @@ if (Object.keys(layouts).length > 0) {
Object.keys(layouts).forEach((layout) => {
commandsLayouts.list.push({
id: "changeLayout" + capitalizeFirstLetter(layout),
- display: layout.replace("_", " "),
+ display: layout.replace(/_/g, " "),
exec: () => {
changeLayout(layout);
restartTest();
diff --git a/public/js/script.js b/public/js/script.js
index 53dc6eefa..f9954df72 100644
--- a/public/js/script.js
+++ b/public/js/script.js
@@ -1424,7 +1424,7 @@ function showResult(difficultyFailed = false) {
testType += " " + config.words;
}
if (config.mode != "custom") {
- testType += "
" + config.language.replace("_", " ");
+ testType += "
" + config.language.replace(/_/g, " ");
}
if (config.punctuation) {
testType += "
punctuation";
@@ -1554,7 +1554,7 @@ function restartTest(withSameWordset = false) {
if (resultVisible) {
if (config.randomTheme) {
randomiseTheme();
- showNotification(config.theme.replace("_", " "), 1500);
+ showNotification(config.theme.replace(/_/g, " "), 1500);
}
$("#words").stop(true, true).animate(
{
diff --git a/public/js/settings.js b/public/js/settings.js
index 7aa6634cc..6da64fbaa 100644
--- a/public/js/settings.js
+++ b/public/js/settings.js
@@ -4,7 +4,7 @@ function updateSettingsPage() {
themesEl.append(
`