From adff6475d13aefac4a7e9e0047d52b4fd683017a Mon Sep 17 00:00:00 2001 From: Jephte CLAIN Date: Wed, 25 Feb 2015 11:45:38 +0400 Subject: [PATCH] ne quoter que les valeurs existantes --- lib/ulib/.ulibver | 2 +- lib/ulib/ldif | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/ulib/.ulibver b/lib/ulib/.ulibver index f2cacb2..a4b87db 100644 --- a/lib/ulib/.ulibver +++ b/lib/ulib/.ulibver @@ -1 +1 @@ -007021000 +007021001 diff --git a/lib/ulib/ldif b/lib/ulib/ldif index 3f2ed33..49385c4 100644 --- a/lib/ulib/ldif +++ b/lib/ulib/ldif @@ -679,7 +679,6 @@ function dump_values(atbegin, value) { attr = norm_attr(attrs[i]) if (i > 1) line = line asep value = values[attr] - if (value == "") value = qempty if (qsep != "" && index(value, qsep) != 0) { if (escape) gsub(qsep, quote_subrepl(escape) "&", value); else gsub(qsep, "&&", value); @@ -726,10 +725,12 @@ $0 != "" && match_attr($1) { values[attr] = "(" tmp ")" } } else { + if (value == "") value = qempty + value = quote_vsep(value, vsep) if (values[attr] == "") { - values[attr] = quote_vsep(value, vsep) + values[attr] = value } else { - values[attr] = values[attr] vsep quote_vsep(value, vsep) + values[attr] = values[attr] vsep value } } }