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