diff --git a/src/lib/plugins/qtwebkit/spellcheck/spellcheckdialog.ui b/src/lib/plugins/qtwebkit/spellcheck/spellcheckdialog.ui
index 18fa22c44..cf8af56d7 100644
--- a/src/lib/plugins/qtwebkit/spellcheck/spellcheckdialog.ui
+++ b/src/lib/plugins/qtwebkit/spellcheck/spellcheckdialog.ui
@@ -17,7 +17,7 @@
-
- <html><head/><body><p><span style=" font-weight:600;">Dictionary path</span></p></body></html>
+ <b>Dictionary path</b>
diff --git a/src/lib/plugins/qtwebkit/spellcheck/speller.cpp b/src/lib/plugins/qtwebkit/spellcheck/speller.cpp
index cffae60be..af910ddc8 100644
--- a/src/lib/plugins/qtwebkit/spellcheck/speller.cpp
+++ b/src/lib/plugins/qtwebkit/spellcheck/speller.cpp
@@ -221,11 +221,9 @@ void Speller::replaceWord()
text.replace(m_startPos, m_endPos - m_startPos, word);
text.replace(QLatin1Char('\\'), QLatin1String("\\\\"));
+ text.replace(QLatin1Char('\n'), QLatin1String("\\n"));
text.replace(QLatin1Char('\''), QLatin1String("\\'"));
- word.replace(QLatin1Char('\\'), QLatin1String("\\\\"));
- word.replace(QLatin1Char('\''), QLatin1String("\\'"));
-
m_element.evaluateJavaScript(QString("this.value='%1'").arg(text));
m_element.evaluateJavaScript(QString("this.selectionStart=this.selectionEnd=%1").arg(cursorPos));
}
diff --git a/tests/form.html b/tests/form.html
index c6013b162..2d2b5b9b6 100644
--- a/tests/form.html
+++ b/tests/form.html
@@ -8,6 +8,10 @@
diff --git a/translations/empty.ts b/translations/empty.ts
index a030cc200..69aad66aa 100644
--- a/translations/empty.ts
+++ b/translations/empty.ts
@@ -4247,10 +4247,6 @@ After adding or removing certificate paths, it is neccessary to restart QupZilla
SpellCheck
-
- <html><head/><body><p><span style=" font-weight:600;">Dictionary path</span></p></body></html>
-
-
Change...
@@ -4283,6 +4279,10 @@ After adding or removing certificate paths, it is neccessary to restart QupZilla
Add new word:
+
+ <b>Dictionary path</b>
+
+
Speller