create new tag
, view all tags

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


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


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 History Action Size Date Who Comment
Unknown file formatdiff Render.diff r1 manage 0.5 K 2005-03-26 - 10:24 UnknownUser  
Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2006-04-29 - SamHasler
  • 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-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.