summaryrefslogtreecommitdiff
path: root/src/webtab/webview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/webtab/webview.cpp')
-rw-r--r--src/webtab/webview.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/webtab/webview.cpp b/src/webtab/webview.cpp
index 5913d11e..1df13dcd 100644
--- a/src/webtab/webview.cpp
+++ b/src/webtab/webview.cpp
@@ -249,11 +249,12 @@ bool WebView::popupSpellMenu(QContextMenuEvent *event)
// replace word
QString script(QL1S("this.value=this.value.substring(0,"));
script += QString::number(s1);
- script += QL1S(") + \"");
+ script += QL1S(") + \'");
script += w;
- script += QL1C('\\') + QL1S("this.value.substring(");
+ script += QL1C('\'') + QL1S("+this.value.substring(");
script += QString::number(s2);
script += QL1C(')');
+
element.evaluateJavaScript(script);
// reposition cursor
element.evaluateJavaScript("this.selectionEnd=this.selectionStart=" + QString::number(selStart) + QL1C(';'));