summaryrefslogtreecommitdiff
path: root/src/webtab/webview.cpp
diff options
context:
space:
mode:
authorLindsay Mathieson <lindsay.mathieson@gmail.com>2013-01-23 20:01:45 +1000
committerLindsay Mathieson <lindsay.mathieson@gmail.com>2013-01-23 20:01:45 +1000
commit8c3ffa99014b041a0bf2b9bedba203042763eef1 (patch)
tree95f4323511c156b886933db8057a8a763e0e43b4 /src/webtab/webview.cpp
parentHistory page, added ability to remove items from (diff)
downloadrekonq-8c3ffa99014b041a0bf2b9bedba203042763eef1.tar.xz
Fixes javascript error for word replacement from the spellcheck popup menu.
Restores Auto Spellcheck option in advanced settings
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(';'));