New Foswiki release 2.1.6 is available with important security fixes.
Sourceforge foswiki email lists being discontinued. Subscribe to the new Foswiki announce and discuss lists at MailingLists

Item10346: MAKETEXT renders 0 if arg is empty

Priority: Normal
Current State: Closed
Released In: 1.1.3
Target Release: patch
Applies To: Engine
Component: I18N, MAKETEXT
Reported By: ArthurClemens
Waiting For:
Last Change By: KennethLavrsen
Let's say I have a combination of MAKETEXT and FORMFIELD, and the field returns an empty string (because the field is empty):

%MAKETEXT{"Component:[_1]" args="%FORMFIELD{"Component"}%"}%

renders as:


For some reason MAKETEXT inserts zeroes for missing arguments, and it is even documented in the code: "fill omitted args with zeros" in line 32.

Why not empty strings?

-- ArthurClemens - 12 Feb 2011

Topic revision: r22 - 16 Apr 2011, KennethLavrsen - This page was cached on 16 Jun 2018 - 11:37.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy