• 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.

As formfield values should be able contain arbitrary values a solution is to url-encode them and decode them for the purpose of being displayed in the form while editing. The ExtendedSelectPlugin allows to separate the formfield value from its actual appearance in the form. This is used in the BlogPlugin when selecting realated blog entries, that is the "Related" formfield is a list of topic names but present them using their date and headline in a multi select box.

Here's the patch to allow that in this plugin:

--- /tmp/ExtendedSelectPlugin/lib/TWiki/Plugins/ExtendedSelectPlugin.pm   2005-10-11 18:33:47.000000000 +0200
+++ lib/TWiki/Plugins/ExtendedSelectPlugin.pm   2005-10-17 18:14:20.000000000 +0200
@@ -46,6 +46,7 @@
     $isValues= ( $type =~ /\+values(\+.+)?$/o);
     my $choices = '';
     foreach $item ( @$possibleValues ) {
+        $item = &TWiki::urlDecode($item);
         $params={};
    $itemValue=$item;
    if( $isValues && ($item =~ /^(.*?[^\\])=(.*)$/o) ) {

I will check that in as it does not hurt the general case (no url-encoded items) and helps me wink But still I feel a little unsure whether this is a more general issue that not only applies to this plugin. Or is that just a local issue (which would make me happy too). Toughts?


As there was no feedback and the plugin author is not responding nor to emails neither on IRC though being logged in to #twiki I just patch that in and release a new version on TWiki.org. Case settled (somehow).

MD

ItemTemplate
Summary decode url-encoded formfield values
ReportedBy MichaelDaum
Codebase

SVN Range

AppliesTo Extension
Component ExtendedSelectPlugin
Priority Normal
CurrentState Closed
WaitingFor

Checkins 7775
Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2005-12-05 - MichaelDaum
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback