Index: trunk/src/org/openstreetmap/josm/gui/tagging/presets/items/Text.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/tagging/presets/items/Text.java	(revision 19260)
+++ trunk/src/org/openstreetmap/josm/gui/tagging/presets/items/Text.java	(revision 19261)
@@ -14,4 +14,5 @@
 import java.util.Collections;
 import java.util.List;
+import java.util.regex.Pattern;
 
 import javax.swing.AbstractButton;
@@ -48,4 +49,5 @@
  */
 public class Text extends KeyedItem {
+    private static final Pattern MULTILINE_WHITESPACE_PATTERN = Pattern.compile("[\\s&&[^\n]]+");
 
     private static int auto_increment_selected; // NOSONAR
@@ -241,5 +243,11 @@
         }
 
-        v = Utils.removeWhiteSpaces(v);
+        if (this.normalize) {
+            if (this.multiline) {
+                v = Utils.removeWhiteSpaces(MULTILINE_WHITESPACE_PATTERN, v);
+            } else {
+                v = Utils.removeWhiteSpaces(v);
+            }
+        }
 
         if (!"false".equals(use_last_as_default) || auto_increment != null) {
Index: trunk/src/org/openstreetmap/josm/gui/tagging/presets/items/TextItem.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/tagging/presets/items/TextItem.java	(revision 19260)
+++ trunk/src/org/openstreetmap/josm/gui/tagging/presets/items/TextItem.java	(revision 19261)
@@ -23,4 +23,9 @@
     /** The context used for translating {@link #text} */
     public String text_context; // NOSONAR
+
+    /** {@code true} if the value is a multiline value */
+    public boolean multiline; // NOSONAR
+    /** {@code true} if the value should be normalized */
+    public boolean normalize = true; // NOSONAR
 
     /** The localized version of {@link #text} */
Index: trunk/src/org/openstreetmap/josm/tools/Utils.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/Utils.java	(revision 19260)
+++ trunk/src/org/openstreetmap/josm/tools/Utils.java	(revision 19261)
@@ -821,8 +821,19 @@
      */
     public static String removeWhiteSpaces(String s) {
+        return removeWhiteSpaces(WHITE_SPACES_PATTERN, s);
+    }
+
+    /**
+     * Removes leading, trailing, and multiple inner whitespaces from the given string, to be used as a key or value.
+     * @param s The string
+     * @param whitespaces The regex for whitespaces to remove outside the leading and trailing whitespaces (see {@link #strip(String)})
+     * @return The string without leading, trailing or multiple inner whitespaces
+     * @since 19261
+     */
+    public static String removeWhiteSpaces(Pattern whitespaces, String s) {
         if (isEmpty(s)) {
             return s;
         }
-        return strip(s).replaceAll("\\s+", " ");
+        return whitespaces.matcher(strip(s)).replaceAll(" ");
     }
 
