diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | src/po.c | 10 |
2 files changed, 9 insertions, 8 deletions
@@ -1,3 +1,10 @@ +2021-02-06 Sergey Poznyakoff <gray@gnu.org.ua> + + Fix po header parsing + + * src/po.c (po_header): Don't handle single quotes. Leave + double-quote handling to mu_wordsplit. + 2018-02-02 Sergey Poznyakoff <gray@gnu.org.ua> Version 3.2 @@ -189,7 +189,7 @@ po_header (const char *name) int status; struct mu_wordsplit ws; int wsflags = MU_WRDSF_NOVAR | MU_WRDSF_NOCMD - | MU_WRDSF_QUOTE + | MU_WRDSF_DQUOTE | MU_WRDSF_CESCAPES | MU_WRDSF_NOSPLIT; char *str; @@ -218,17 +218,11 @@ po_header (const char *name) len = po_read_line (&pof, &buf, &bufsize); if (buf[len - 1] == '\n') buf[--len] = 0; - + for (p = buf; *p && mu_isblank (*p); p++, len--) ; if (*p == 0) break; - if (*p == '"' && p[len - 1] == '"') - { - p[len-1] = 0; - len -= 2; - p++; - } if (len == 0) continue; if (mu_wordsplit (p, &ws, wsflags)) |