You are here: Foswiki>Tasks Web>Item2300 (28 Oct 2009, AndrewJones)Edit Attach

Item2300: FilterPlugin unexpectedly, "eats" content

pencil
Priority: Normal
Current State: No Action Required
Released In:
Target Release: n/a
Applies To: Extension
Component: FilterPlugin
Branches:
Reported By: VickiBrown
Waiting For:
Last Change By: AndrewJones
This problem occurs on our corporate TWiki installation. We are using [Plugins/FilterPlugin][FilterPlugin]] v1.51. The problem has been reproduced in Foswiki 1.0.7 with FilterPlugin 1.80, $Rev: 4417 (2009-07-03)

FilterPlugin works as expected up to the last possible match. After that, all trailing text disappears entirely.

In the example below, the text , IP datagrams on Avian Carriers -- if you can see this, Twiki is no longer eating text that I put here. vanishes after rendering.

The Code
%STARTSUBST{pattern="RFC ?(\d+)" format="[[http://www.rfc-editor.org/rfc/rfc$1.txt][RFC$1]]"}%
   * RFC 2971, IMAP =ID= Extension (the moral equivalent of =User-Agent=)
   * RFC 3501, the IMAP 4 base spec, replacing RFC 2060 and RFC 1730
   * RFC 5530, IMAP Response Codes, which improves the machine-readable IMAP errors
   * RFC 4315, =UIDPLUS= extension, which replaces RFC 2359
   * RFC 4422, SASL, the "Simple" Authentication and Security Layer, is really a generalization of the IMAP4 =AUTHENTICATE= command.
   * RFC 1149, IP datagrams on Avian Carriers -- if you can see this, Twiki is no longer eating text that I put here.
%STOPSUBST%

Workaround

In v1.51, a workaround is to force one final pattern match after the real data.

%STARTSUBST{pattern="RFC ?(\d+)" format="[[http://www.rfc-editor.org/rfc/rfc$1.txt][RFC$1]]"}%
   * RFC 2971, IMAP =ID= Extension (the moral equivalent of =User-Agent=)
   * RFC 3501, the IMAP 4 base spec, replacing RFC 2060 and RFC 1730
   * RFC 5530, IMAP Response Codes, which improves the machine-readable IMAP errors
   * RFC 4315, =UIDPLUS= extension, which replaces RFC 2359
   * RFC 4422, SASL, the "Simple" Authentication and Security Layer, is really a generalization of the IMAP4 =AUTHENTICATE= command.
   * RFC 1149, IP datagrams on Avian Carriers -- if you can see this, Twiki is no longer eating text that I put here.
<!-- RFC 0  workaround for SUBST bug -->
%STOPSUBST%

However, in v 1.80 this does not work. Again, the text following the final pattern is "eaten", disrupting the HTML comment.

-- VickiBrown - 27 Oct 2009

Tested the example on Foswiki 1.07 with the latest version of the FilterPlugin and it seems fine. Latest version is 1.90 dated September 14. Foswiki.org runs with version 1.80.

-- LarsEik - 27 Oct 2009

Already reported and fixed in Item2068.

-- MichaelDaum - 27 Oct 2009

When might we expect to see this in production? LarsEik says "Latest version is 1.90 dated September 14" but System/FilterPlugin is version 1.80. If there's a later version somewhere, it hasn't been posted.

--Main.VickiBrown

The latest version (1.90) can be downloaded from Extensions.FilterPlugin.

-- AndrewJones - 28 Oct 2009

ItemTemplate edit

Summary FilterPlugin unexpectedly, "eats" content
ReportedBy VickiBrown
Codebase
SVN Range Foswiki-1.0.7, Sun, 20 Sep 2009, build 5061
AppliesTo Extension
Component FilterPlugin
Priority Normal
CurrentState No Action Required
WaitingFor
Checkins
TargetRelease n/a
ReleasedIn
I Attachment Action Size Date Who Comment
Item2300Picture1.pngpng Item2300Picture1.png manage 32 K 27 Oct 2009 - 16:29 VickiBrown  
Item2300Picture2.pngpng Item2300Picture2.png manage 36 K 27 Oct 2009 - 16:30 VickiBrown  
Topic revision: r5 - 28 Oct 2009, AndrewJones
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy