]> git.plutz.net Git - confetti/blobdiff - pdiread.sh
bugfix: field splitting
[confetti] / pdiread.sh
index e01c71c42229790ae65b34f15fd8416a1bf38415..112a827c15c03726e8818cdfc1b1973a90ae74a2 100755 (executable)
@@ -38,11 +38,6 @@ pdi_load() {
     # === strip trailing CR (but keep CRs in property value) ===
     # s;\r$;;;  # already done in in previous filter
 
-    # unscramble aggregated fields
-    :disag
-    s;^([^:]+:)((.*[^\])?(\\\\)*),;\1\2\n\1;;
-    t disag;
-
     # === Normalise various known vendor properties ===
                 s;^X-MS-CARDPICTURE(\;|:);PHOTO\1;;
                         s;^X-GENDER(\;|:);GENDER\1;;
@@ -75,6 +70,11 @@ pdi_load() {
 
     # === Insert empty attribute fields where no attributes are present ===
     s;^([^;:]+):;\1\;:;;
+
+    # unscramble aggregated fields
+    :disag
+    s;^([^:]+:)((.*[^\])?(\\\\)*),;\1\2\n\1;;
+    t disag;
     '
 }