Tags:
archive_me1Add my vote for this tag create new tag
view all tags

Bug: Backslash line break breaks form

Using backslashes in the table formatting used to create a TWiki Form (e.g., to make a list of options easier to read/maintain) breaks the edit view of the form (options and subsequent fields go missing).

Test case

Sandbox.BackslashBrokenForm is an example of a form which would break. However, I don't have sufficient permissions to create a page using this form, so I can't demonstrate here.

Environment

TWiki version: TWikiRelease01Feb2003
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin, TWikiDrawPlugin, (1 local plugin)
Server OS: redhat-release-7.1-1 on x86
Web server: Apache/1.3.19 (Unix) (Red-Hat/Linux) PHP/4.0.4pl1 mod_perl/1.24_01
Perl version: perl, v5.6.0 built for i386-linux
Client OS: MS Win2K
Web Browser: IE6

-- JacobNevins - 20 Oct 2003

Follow up

Just a procedural note: people need the rights to test this sort of thing on TWiki - can we adjust permissions? -- MartinCleaver - 20 Oct 2003

Fix record

OK, this is pretty obviously due to the fact that the table parser used for forms is not the same as the table parser used for tables, and doesn't suport backslashes. Since normal rendering of the form table doesn't show any problems, it is only logical that the form parser also not show any problems when parsing the form def. There's a one-line fix, that I can't find any negative reasons for. In Form::getFormDefinition, just before the line loop, add:

$text =~ s/\\\r?\n//go;
and it all works nicely. Just needs someone with checkin permissions. Assigned to PeterThoeny on the basis that he is most likely to know of any potential side-effects.

-- CrawfordCurrie - 12 Jul 2004

Thanks Crafword, is now in SVN and at TWiki.org. I can't anticipate any side-effects.

-- PeterThoeny - 17 Jul 2004

Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r5 - 2004-07-17 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.