From 91600015b9613467cc8f701bbd1c19fc11732108 Mon Sep 17 00:00:00 2001 From: jeena Date: Wed, 4 Sep 2013 20:23:14 +0200 Subject: [PATCH] fixed problem with some replies --- Qt/Windows.py | 2 +- WebKit/scripts/helper/Core.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Qt/Windows.py b/Qt/Windows.py index 762a02a..3fb4d48 100644 --- a/Qt/Windows.py +++ b/Qt/Windows.py @@ -409,7 +409,7 @@ class NewPost(Helper.RestorableWindow): helpMenu.addAction(developerExtrasAction) def load_finished(self, widget): - callback = "function() { bungloo.newpost.setStatus('%s'); }" % (self.status_string) + callback = "function() { bungloo.newpost.setStatus(\"%s\"); }" % (self.status_string) script = "function HostAppGo() { start('newpost', " + callback + "); }" self.webView.page().mainFrame().evaluateJavaScript(script) self.webView.setFocus() diff --git a/WebKit/scripts/helper/Core.js b/WebKit/scripts/helper/Core.js index 2e970a8..fe28939 100644 --- a/WebKit/scripts/helper/Core.js +++ b/WebKit/scripts/helper/Core.js @@ -555,7 +555,7 @@ function(jQuery, APICalls, URI, HostApp) { if(mentions) { for (var j = 0; j < mentions.length; j++) { var m = mentions[j]; - if(m.entity.startsWith(e)) { + if(m && m.entity && m.entity.startsWith(e)) { mentions_in_text.push({ entity: m.entity, text: name