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 11586)
+++ /applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/api/NewAction.java	(revision 11587)
@@ -31,4 +31,6 @@
 import java.io.IOException;
 import java.net.URLEncoder;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
 
 import org.openstreetmap.josm.Main;
@@ -59,15 +61,20 @@
 		String result = null;
 		if(Main.pref.getBoolean(ConfigKeys.OSB_API_DISABLED)) {
-			result = "ok";
+			result = "ok 12345";
 		} else {
 			result = HttpUtils.post(uri, null, post, CHARSET);
 		}
 		
-		if(result != null && !result.startsWith("ok")) {
+		Pattern resultPattern = Pattern.compile("ok\\s+(\\d+)");
+		Matcher m = resultPattern.matcher(result);
+		String id = "-1";
+		if(m.matches()) {
+			id = m.group(1);
+		} else {
 			throw new RuntimeException("Couldn't create new bug. Result: " + result);
 		}
 		
 		Node osmNode = new Node(latlon);
-		osmNode.put("id", "-1");
+		osmNode.put("id", id);
 		osmNode.put("note", text);
 		osmNode.put("openstreetbug", "FIXME");
