From: Peter T. <pet...@us...> - 2001-07-20 07:15:28
|
Update of /cvsroot/twiki/twiki/lib In directory usw-pr-cvs1:/tmp/cvs-serv21732 Modified Files: TWiki.pm Log Message: Codev.SearchResultsDisplayProblemIn20010717 Index: TWiki.pm =================================================================== RCS file: /cvsroot/twiki/twiki/lib/TWiki.pm,v retrieving revision 1.54 retrieving revision 1.55 diff -C2 -r1.54 -r1.55 *** TWiki.pm 2001/07/18 09:53:36 1.54 --- TWiki.pm 2001/07/20 07:15:26 1.55 *************** *** 99,103 **** # =========================== # TWiki version: ! $wikiversion = "17 Jul 2001"; # =========================== --- 99,103 ---- # =========================== # TWiki version: ! $wikiversion = "20 Jul 2001"; # =========================== *************** *** 1742,1746 **** { my( $text, $theWeb ) = @_; ! my( $result, $insidePRE, $insideVERBATIM, $insideTABLE, $noAutoLink, $blockquote ); # FIXME: Get $theTopic from parameter to handle [[#anchor]] correctly --- 1742,1746 ---- { my( $text, $theWeb ) = @_; ! my( $head, $result, $insidePRE, $insideVERBATIM, $insideTABLE, $noAutoLink, $blockquote ); # FIXME: Get $theTopic from parameter to handle [[#anchor]] correctly *************** *** 1752,1755 **** --- 1752,1757 ---- $theWeb = $webName; } + + $head = ""; $result = ""; $insidePRE = 0; *************** *** 1762,1765 **** --- 1764,1775 ---- $text =~ s/\\\n//go; # Join lines ending in "\" + # do not render HTML head, style sheets and scripts + if( $text =~ m/<body[\s\>]/i ) { + my $bodyTag = ""; + my $bodyText = ""; + ( $head, $bodyTag, $bodyText ) = split( /(<body)/i, $text, 3 ); + $text = $bodyTag . $bodyText; + } + # Wiki Plugin Hook &TWiki::Plugins::startRenderingHandler( $text, $theWeb ); *************** *** 1917,1921 **** &TWiki::Plugins::endRenderingHandler( $result ); ! return $result; } --- 1927,1931 ---- &TWiki::Plugins::endRenderingHandler( $result ); ! return "$head$result"; } |