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>");
                 }
             }
