diff --git a/Qt/Bungloo.py b/Qt/Bungloo.py
index 05dad38..c9a4bf3 100755
--- a/Qt/Bungloo.py
+++ b/Qt/Bungloo.py
@@ -174,7 +174,7 @@ class Controller(QtCore.QObject):
pass
@QtCore.pyqtSlot()
- def openNewMessageWidow(self):
+ def openNewMessageWidow(self, text=""):
self.openNewMessageWindowInReplyToStatus("") # FIXME: create a status_string with this content
@QtCore.pyqtSlot(str)
diff --git a/WebKit/scripts/controller/NewPost.js b/WebKit/scripts/controller/NewPost.js
index 1e6f5fc..e489041 100644
--- a/WebKit/scripts/controller/NewPost.js
+++ b/WebKit/scripts/controller/NewPost.js
@@ -189,7 +189,7 @@ function(APICalls, HostApp) {
}
NewPost.prototype.replaceAll = function(txt, replace, with_this) {
- return txt.replace(new RegExp(replace, 'g'),with_this);
+ return txt.replace(new RegExp(replace, 'g'), with_this);
}
NewPost.prototype.replaceWithName = function(txt, with_item) {
@@ -228,7 +228,7 @@ function(APICalls, HostApp) {
// parse the text:
// replace all the line braks by
, and all the double spaces by the html version
text = this.replaceAll(text,'\n','
');
- text = this.replaceAll(text,' ',' ');
+ //text = this.replaceAll(text,' ',' ');
// replace the words by a highlighted version of the words
diff --git a/WebKit/scripts/helper/Core.js b/WebKit/scripts/helper/Core.js
index 89399d0..50b284c 100644
--- a/WebKit/scripts/helper/Core.js
+++ b/WebKit/scripts/helper/Core.js
@@ -318,12 +318,12 @@ function(jQuery, APICalls, URI, HostApp, Markdown) {
return false;
});
- // {"type":"Point","coordinates":[57.10803113,12.25854746]}
- if (status.content && status.content.location && (typeof status.content.location.type == "undefined" || status.content.location.type == "Point")) {
- var lat = status.content.location.coordinates[0];
- var lng = status.content.location.coordinates[1];
+ if (status.content && status.content.location) {
+ var lat = status.content.location.latitude;
+ var lng = status.content.location.longitude;
if (typeof lat != "undefined" && typeof lng != "undefined" && lat > 0 && lng > 0) {
+
var href = this.mapHref(lat, lng);
template.geo.href = href;
template.geo.style.display = "";
diff --git a/WebKit/scripts/main.js b/WebKit/scripts/main.js
index 3610608..64fcaca 100644
--- a/WebKit/scripts/main.js
+++ b/WebKit/scripts/main.js
@@ -199,4 +199,8 @@ String.prototype.escapeSpecialChars = function() {
.replace(/[\n]/g, '\\n')
.replace(/[\r]/g, '\\r')
.replace(/[\t]/g, '\\t');
+}
+
+String.prototype.escapeRegExp = function() {
+ return this.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
}
\ No newline at end of file