Tags:
create new tag
, view all tags

Patch Proposal: <p/> prefixed to %TEXT% tag

Description

When the %TEXT% tag is replaced by TWiki::Render::View.pm it somehow added an extra newline to the beginning of the topic text. Substitution is done by cutting of a leading <DOCTYPE...> tag that is prevented from being piped thru the rendering process. Later on, it is added to the return value again. But actually the code that extracted the $doctype used $1 in a flawed way: if the regexp doesn't match, the $doctype variable still set to $1 not being undefined but still holding an arbitrary value ... actually a newline.

This patch initializes $doctype first with the empty string and only assigns something else to it if actually needed.

Maybe the rest of TWiki has to be audited for the same coding pattern, which not always shows up as an error but needs to be fixed.

-- MichaelDaum - 26 Mar 2005


Discussion:

OK, applied the patch. Will check in when the SVN store is back.

-- CrawfordCurrie - 26 Mar 2005

I'm assuming from the above that this made it into Dakar so I'm upgrading it to ChangeProposalForm and marking it as such.

-- SamHasler - 29 Apr 2006

Topic attachments
I Attachment Action Size Date Who Comment
Unknown file formatdiff Render.diff manage 0.5 K 2005-03-26 - 10:24 UnknownUser  
Topic revision: r3 - 2006-04-29 - SamHasler
 
Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
  • Download TWiki
TWiki logo Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.