You are here: Foswiki>Tasks Web>Item13279 (11 May 2015, GeorgeClark)Edit Attach

Item13279: verbatim and related blocks are not removed from text after plugin commonTagsHandler

pencil
Priority: Normal
Current State: Confirmed
Released In: n/a
Target Release: n/a
Applies To: Engine
Component: FoswikiPluginsAPI, FoswikiRender
Branches:
Reported By: JohnKnutson
Waiting For:
Last Change By: GeorgeClark
The current processing of Plugins commonTagsHandler appears to remove verbatim and related tags from the text prior to the first commonTagsHandler call and never in between. As a result, if two plugins have commonTagsHandlers defined, and one inserts a verbatim block in the text, that verbatim block will still be present in the text when the commonTagsHandler of the second plugin is called. As a result of this, the second plugin's commonTagsHandler may erroneously process the text within a verbatim block.

An example of this is the plugin I'm working on (DataFlowDiaPlugin) and the DirectedGraphPlugin. For the purposes of debugging, I have stuck the output of DataFlowDiaPlugin in a verbatim block in commonTagsHandler. DirectedGraphPlugin, like most (if not all) plugins has an expectation that the verbatim blocks will have been removed and as a result erroneously processes the dot block nested within.

Either plugins should have an expectation that these blocks are removed from the text passed to commonTagsHandler, in which case the render engine should be removing them between each plugin's commonTagsHandler, or they should not have this expectation in which case DirectedGraphPlugin (and likely any other plugin that uses commonTagsHandler) is incorrectly implemented and needs to have some takeOutBlocks calls inserted into the commonTagsHandler to properly handle verbatim, pre and so on.

IMO the plugins should have the expectation that the text is already removed (which is the case now, provided no plugin inserts verbatim/pre blocks in the commonTagsHandler), and it's the render engine that is failing to remove these blocks between CTH calls.

-- JohnKnutson - 24 Feb 2015

Confirming this issue.

-- GeorgeClark - 11 May 2015
 

ItemTemplate edit

Summary verbatim and related blocks are not removed from text after plugin commonTagsHandler
ReportedBy JohnKnutson
Codebase 1.1.9
SVN Range
AppliesTo Engine
Component FoswikiPluginsAPI, FoswikiRender
Priority Normal
CurrentState Confirmed
WaitingFor
Checkins
TargetRelease n/a
ReleasedIn n/a
CheckinsOnBranches
trunkCheckins
masterCheckins
ItemBranchCheckins
Release01x01Checkins
Topic revision: r2 - 11 May 2015, GeorgeClark
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