Index: trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java	(revision 13316)
+++ trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java	(revision 13317)
@@ -420,5 +420,7 @@
                         JOptionPane.showMessageDialog(
                                 Main.parent,
-                                tr("Search expression is not valid: \n\n {0}", e.getMessage()),
+                                "<html>" + tr("Search expression is not valid: \n\n {0}",
+                                        e.getMessage().replace("<html>", "").replace("</html>", "")).replace("\n", "<br>") +
+                                "</html>",
                                 tr("Invalid search expression"),
                                 JOptionPane.ERROR_MESSAGE);
Index: trunk/src/org/openstreetmap/josm/data/osm/search/SearchCompiler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/search/SearchCompiler.java	(revision 13316)
+++ trunk/src/org/openstreetmap/josm/data/osm/search/SearchCompiler.java	(revision 13317)
@@ -201,9 +201,10 @@
                             return new TimestampRange(minDate, maxDate);
                         } else {
-                            throw new SearchParseError("<html>" + tr("Expecting {0} after {1}", "<i>min</i>/<i>max</i>", "<i>timestamp</i>"));
+                            throw new SearchParseError("<html>" + tr("Expecting {0} after {1}", "<i>min</i>/<i>max</i>", "<i>timestamp</i>")
+                                + "</html>");
                         }
                     }
                 } else {
-                    throw new SearchParseError("<html>" + tr("Expecting {0} after {1}", "<code>:</code>", "<i>" + keyword + "</i>"));
+                    throw new SearchParseError("<html>" + tr("Expecting {0} after {1}", "<code>:</code>", "<i>" + keyword + "</i>") + "</html>");
                 }
             }
Index: trunk/test/unit/org/openstreetmap/josm/data/osm/search/SearchCompilerTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/osm/search/SearchCompilerTest.java	(revision 13316)
+++ trunk/test/unit/org/openstreetmap/josm/data/osm/search/SearchCompilerTest.java	(revision 13317)
@@ -18,4 +18,5 @@
 import org.junit.Rule;
 import org.junit.Test;
+import org.junit.rules.ExpectedException;
 import org.openstreetmap.josm.TestUtils;
 import org.openstreetmap.josm.data.coor.LatLon;
@@ -55,4 +56,10 @@
     public JOSMTestRules test = new JOSMTestRules().preferences();
 
+    /**
+     * Rule to assert exception message.
+     */
+    @Rule
+    public ExpectedException expectedEx = ExpectedException.none();
+
     private static final class SearchContext {
         final DataSet ds = new DataSet();
@@ -686,3 +693,14 @@
         }
     }
+
+    /**
+     * Non-regression test for <a href="https://josm.openstreetmap.de/ticket/15755">Bug #15755</a>.
+     * @throws SearchParseError always
+     */
+    @Test
+    public void testTicket15755() throws SearchParseError {
+        expectedEx.expect(SearchParseError.class);
+        expectedEx.expectMessage("<html>Expecting <code>:</code> after <i>type</i></html>");
+        SearchCompiler.compile("public_transport=stop_area -type");
+    }
 }
