Index: /applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/api/CloseAction.java
===================================================================
--- /applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/api/CloseAction.java	(revision 16133)
+++ /applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/api/CloseAction.java	(revision 16134)
@@ -57,5 +57,5 @@
         }
 
-        if("ok".equalsIgnoreCase(result)) {
+        if("ok".equalsIgnoreCase(result.trim())) {
             n.put("state", "1");
             Main.map.mapView.repaint();
Index: /applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/api/DownloadAction.java
===================================================================
--- /applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/api/DownloadAction.java	(revision 16133)
+++ /applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/api/DownloadAction.java	(revision 16134)
@@ -76,5 +76,5 @@
         String idPattern = "\\d+";
         String floatPattern = "-?\\d+\\.\\d+";
-        String pattern = "putAJAXMarker\\(("+idPattern+"),("+floatPattern+"),("+floatPattern+"),\"(.*)\",([01])\\)";
+        String pattern = "putAJAXMarker\\s*\\(\\s*("+idPattern+")\\s*,\\s*("+floatPattern+")\\s*,\\s*("+floatPattern+")\\s*,\\s*(?:\"|\')(.*)(?:\"|\')\\s*,\\s*([01])\\s*\\)";
         Pattern p = Pattern.compile(pattern);
         Matcher m = p.matcher(content);
Index: /applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/api/EditAction.java
===================================================================
--- /applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/api/EditAction.java	(revision 16133)
+++ /applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/api/EditAction.java	(revision 16134)
@@ -60,5 +60,5 @@
         }
 
-        if("ok".equalsIgnoreCase(result)) {
+        if("ok".equalsIgnoreCase(result) || "comment added\n".equalsIgnoreCase(result)) {
             String desc = n.get("note");
             desc = desc.concat("<hr />").concat(comment);
Index: /applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/api/NewAction.java
===================================================================
--- /applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/api/NewAction.java	(revision 16133)
+++ /applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/api/NewAction.java	(revision 16134)
@@ -68,5 +68,5 @@
         }
 
-        Pattern resultPattern = Pattern.compile("ok\\s+(\\d+)");
+        Pattern resultPattern = Pattern.compile("ok\\s+(\\d+)\\s*");
         Matcher m = resultPattern.matcher(result);
         String id = "-1";
@@ -74,5 +74,5 @@
             id = m.group(1);
         } else {
-            throw new RuntimeException(tr("Couldn't create new bug. Result: {0}" + result));
+            throw new RuntimeException(tr("Couldn't create new bug. Result: {0}", result));
         }
 
