• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item6267: FORMFIELD expands $title to field name if $title exists in field value

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Engine   Normal Closed   patch 4.3.2

Edit Form Data

Reported By:
Applies To:
Current State:
Waiting For:
Target Release:
Released In:


If you have a form field that contains $title as part of the value, it gets expanded to the name of the form field. It should remain as is. The $title may only be expanded if it exists in the format="" parameter.


--- Render.pm   (revision 18078)
+++ Render.pm   (working copy)
@@ -854,6 +854,7 @@
         # Otherwise default to value
         $format = '$value';
+    $format =~ s/\$title/X-Title-Place-Holder/go; # Item6267: Use place holder (see below)
     my $formWeb;
     if ( $formTopic ) {
@@ -913,7 +914,8 @@
         $text = $altText || '';
-    $text =~ s/\$title/$title/go;
+    # Item6267: Can't use \$title since "$title" might exist in form field value
+    $text =~ s/X-Title-Place-Holder/$title/go;
     return $text;

-- TWiki:Main/PeterThoeny - 15 May 2009

Summary FORMFIELD expands $title to field name if $title exists in field value
ReportedBy TWiki:Main.PeterThoeny
Codebase 4.3.1, ~twiki4
SVN Range TWiki-5.0.0, Sat, 18 Apr 2009, build 18024
AppliesTo Engine

Priority Normal
CurrentState Closed

Checkins TWikirev:18079 TWikirev:18080
TargetRelease patch
ReleasedIn 4.3.2
Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r5 - 2010-05-31 - PeterThoeny
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback