Bug: Checkbox values not restored when editing a form
See
DebianBug:152766
Debian Bug report logs -
#152766
twiki: need \Q...\E in TWiki::Form::renderForEdit
Reported by: Jonathan H N Chin <jhnc%stone@newton.cam.ac.uk>
Date: Fri, 12 Jul 2002 16:18:01 UTC
Severity: normal
Found in version 20011201-1
Fixed in version twiki/20030201-1
Done: Sven Dowideit <svenud@ozemail.com.au>
Bug is archived. No further changes may be made.
Reply or subscribe to this bug.
Toggle useless messages
Message #5 received at submit@bugsPLEASENOSPAM.debian.org (full text, mbox):
Package: twiki
Version: 20011201-1
Severity: normal
I set up a TWikiForm like:
| *Name:* | *Type: | *Size:* | *Values:* | *Tooltip message:* |
| myfield2 | checkbox | 3 | [[MyWikiWord1][opt1]], [[MyWikiWord2][opt2] | |
and then attach it to a topic.
I edit the topic and set some checkboxes.
Once I have saved the topic, if I re-edit it, the checkbox values
are "unset" regardless of what actual value was saved.
I have painfully traced this to TWiki::Form::renderForEdit which does
not escape $item when it is used in the checkbox match:
if ( $value =~ /(^|,\s*)$item(,|$)/ ) {
This would be better written as:
if ( $value =~ /(^|,\s*)\Q$item\E(,|$)/ ) {
which would give the expected result (ie. checkboxes are selected).
-- System Information
Debian Release: 3.0
Kernel Version: Linux stone 2.2.16int4+usb3 #1 SMP Thu Jul 27 17:18:16 BST 2000 i686 unknown
Message #10 received at 152766@bugsPLEASENOSPAM.debian.org (full text, mbox):
[Message part 1 (text/plain, inline)]
see http://www.twiki.org/cgi-bin/view/Codev/FormRenderForEdit
sven
[signature.asc (application/pgp-signature, inline)]
Reply sent to
Sven Dowideit <svenud@ozemail.com.au>:
You have taken responsibility.
Full text and
rfc822 format available.
Notification sent to
Jonathan H N Chin <jhnc%stone@newton.cam.ac.uk>:
Bug acknowledged by developer.
Full text and
rfc822 format available.
Message #15 received at 152766-close@bugsPLEASENOSPAM.debian.org (full text, mbox):
Source: twiki
Source-Version: 20030201-1
We believe that the bug you reported is fixed in the latest version of
twiki, which is due to be installed in the Debian FTP archive:
twiki_20030201-1.diff.gz
to pool/main/t/twiki/twiki_20030201-1.diff.gz
twiki_20030201-1.dsc
to pool/main/t/twiki/twiki_20030201-1.dsc
twiki_20030201-1_all.deb
to pool/main/t/twiki/twiki_20030201-1_all.deb
twiki_20030201.orig.tar.gz
to pool/main/t/twiki/twiki_20030201.orig.tar.gz
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 152766@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Sven Dowideit <svenud@ozemail.com.au> (supplier of updated twiki package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Format: 1.7
Date: Sun, 27 Aug 2003 00:00:01 -1000
Source: twiki
Binary: twiki
Architecture: source all
Version: 20030201-1
Distribution: unstable
Urgency: low
Maintainer: Sven Dowideit <svenud@ozemail.com.au>
Changed-By: Sven Dowideit <svenud@ozemail.com.au>
Description:
twiki - A Web Based Collaboration Platform
Closes: 149319 151187 151188 152766 153168 153430 163514 165340 169791 171421 171426 171441 171468 177047 183917 190409 192718 199999 200575
Changes:
twiki (20030201-1) unstable; urgency=low
.
* Changed Maintainership - Mark W. Eichin has no time
* upgrade to 01Feb2003 release (Bejing) (Closes: #192718)
* removed the use of twikidat user for now,
- it causes problems with uploads of attachments and topic edits
- (Closes: #163514, #165340, #171441, #153430)
* removed the Alias /twiki line in apache.conf
- (Closes: #151187, #190409)
* fixed postrm script (Closes: #171421)
* added TWikiOnDebian to README.Debian (Closes: #171468)
* changed the path to grep
- (Closes: #177047)
* removed perl-suid dependancy for the moment (Closes: #149319)
* added dependency for apache2 | apache | apache-ssl (Closes: #171426)
* switched to gettext for the debconf templates (Closes: #199999)
* added french translation of the debconf templates (Closes: #200575)
* seems to fix apt-get --purge remove twiki (Closes: #183917)
* this has been resolved upstream (Closes: #151188)
* this has been resolved upstream (Closes: #153168)
* this has been resolved upstream
- http://www.twiki.org/cgi-bin/view/Codev/FormRenderForEdit
- (Closes: #152766)
* seems to be working now with perl 5.8.0 (Closes: #169791)
Files:
5cef82d7262aac9bc5188681abcc5af7 690 web optional twiki_20030201-1.dsc
cbbd937b51b56c5343b5e72f1be6a0cf 892554 web optional twiki_20030201.orig.tar.gz
50857c5b0731e8d6cdd3161579aae086 11941 web optional twiki_20030201-1.diff.gz
0921e438c274a5893d094424aa804b37 882892 web optional twiki_20030201-1_all.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
iQCVAwUBP1tNND6XMRfcxSjpAQE6DwQAkBRZHUG/2mC4pCeW9PKfru1Owiy9LcAi
frG7ACcry0h1el35+XPZxGLD3BaedH/l3vmQvqeFvr/sCwgDo/73jwGDS5X8b/AZ
JjJG1u2+zW2Zioy2uPke5PvVm9ihqQe2afqWmfCH1Z3qp8jCyl0PuhTRZFTLLatG
HlSZ3lcKCwI=
=ib4w
-----END PGP SIGNATURE-----
Send a report that this bug log contains spam.
Debian bug tracking system administrator <owner@bugs.debian.org>.
Last modified:
Wed Dec 3 23:37:22 2008
Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.
From: Jonathan H N Chin <jhnc%stone@newton.cam.ac.uk>
Subject: twiki: need \Q...\E in TWiki::Form::renderForEdit
To:
submit@bugsPLEASENOSPAM.debian.org
X-Mailer: bug 3.3.10.1
Delivered-To:
submit@bugsPLEASENOSPAM.debian.org
Package: twiki
Version: 20011201-1
Severity: normal
I set up a
TWikiForm? like:
| *Name:* | *Type: | *Size:* | *Values:* | *Tooltip message:* |
| myfield2 | checkbox | 3 | [[MyWikiWord1][opt1]], [[MyWikiWord2][opt2] | |
and then attach it to a topic.
I edit the topic and set some checkboxes.
Once I have saved the topic, if I re-edit it, the checkbox values
are "unset" regardless of what actual value was saved.
I have painfully traced this to TWiki::Form::renderForEdit which does
not escape $item when it is used in the checkbox match:
if ( $value =~ /(^|,\s*)$item(,|$)/ ) {
This would be better written as:
if ( $value =~ /(^|,\s*)\Q$item\E(,|$)/ ) {
which would give the expected result (ie. checkboxes are selected).
-- System Information
Debian Release: 3.0
Kernel Version: Linux stone 2.2.16int4+usb3 #1 SMP Thu Jul 27 17:18:16 BST 2000 i686 unknown
|
|
| TWiki version: |
Dec2001 |
| TWiki plugins: |
|
| Server OS: |
Debian Linux |
| Web server: |
|
| Perl version: |
|
| Client OS: |
|
| Web Browser: |
|
|
|
|
--
SvenDowideit - 26 Jan 2003
Sven, thanks for reporting this upstream.
Fixed, in
TWikiAlphaRelease and TWiki.org.
--
PeterThoeny - 27 Jan 2003