X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Fsubst.c;h=b54e921ee9946b3c1c738ad9576f96dd26bb83ab;hb=HEAD;hp=0cd7615f26b1b5746b8c4871be568aa9b2090e56;hpb=855073983438f28a7672b39a679da6b5bac541e9;p=citadel.git diff --git a/webcit/subst.c b/webcit/subst.c index 0cd7615f2..f6725cd58 100644 --- a/webcit/subst.c +++ b/webcit/subst.c @@ -15,7 +15,7 @@ #define SHOW_ME_VAPPEND_PRINTF #include "webcit.h" -#include "webserver.h" + extern char *static_dirs[PATH_MAX]; /* Disk representation */ @@ -639,7 +639,12 @@ void StrBufAppendTemplate(StrBuf *Target, StrEscAppend(Target, Source, NULL, 0, 2); break; case 'X': - StrEscAppend(Target, Source, NULL, 0, 0); + if (!IsEmptyStr(ChrPtr(Source))) { + StrEscAppend(Target, Source, NULL, 0, 0); + if (pFmt[1]) { + StrBufAppendBufPlain(Target, pFmt, -1, 1); + } + } break; case 'J': StrECMAEscAppend(Target, Source, NULL);