• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item5678: genPDF is losing text when there are NEWTOPICLINKS

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Extension genPDFAddon Urgent Closed   n/a  

Edit Form Data

Summary:
Reported By:
Codebase:
Applies To:
Component:
Priority:
Current State:
Waiting For:
Target Release:
Released In:
 

Detail

basically, there is a regex in there that greedily removes more than it should

 Index: lib/TWiki/Contrib/GenPDF.pm

===================================================================

--- lib/TWiki/Contrib/GenPDF.pm    (revision 378)

+++ lib/TWiki/Contrib/GenPDF.pm    (working copy)

@@ -243,7 +243,8 @@

 

    # convert twikiNewLinks to normal text

    # FIXME - should this be a preference?

-   $text =~ s/<span class="twikiNewLink".*?>([\w\s]+)<.*?\/span>/$1/gs;

+   # BUG: this will match _everything_ from the first open span, to the last end span, losing alot of content.

+   #$text =~ s/<span class="twikiNewLink".*?>([\w\s]+)<.*?\/span>/$1/gs;

 

    # Fix the image tags to use hard-desk path range than url paths.

    # This is needed in case wiki requires read authentication like SSL client

@@ -362,7 +363,8 @@

 

    # convert twikiNewLinks to normal text

    # FIXME - should this be a preference?

-   $html =~ s/<span class="twikiNewLink".*?>([\w\s]+)<.*?\/span>/$1/gs;

+   # BUG: this will match _everything_ from the first open span, to the last end span, losing alot of content.

+   #$html =~ s/<span class="twikiNewLink".*?>([\w\s]+)<.*?\/span>/$1/gs;

 

    # Fix the image tags to use hard-disk path rather than relative url paths for

    # images.  Needed if wiki requires authentication like SSL client certifcates.

-- TWiki:Main/SvenDowideit - 03 Jun 2008

Its probably better to set the NEWTOPICLINK setting rather than post processing it.

-- TWiki:Main.SvenDowideit - 03 Jun 2008

ItemTemplate
Summary genPDF is losing text when there are NEWTOPICLINKS
ReportedBy TWiki:Main.SvenDowideit
Codebase

SVN Range TWiki-5.0.0, Sun, 01 Jun 2008, build 16865
AppliesTo Extension
Component genPDFAddon
Priority Urgent
CurrentState Closed
WaitingFor

Checkins TWikirev:16939
TargetRelease n/a
ReleasedIn

Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r2 - 2008-06-25 - SvenDowideit
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback