Allow generic post-processing of template content
|Priority:||Should have||Due date:|
|Assignee:||Karsten Dambekalns||% Done:||
Currently relative URLs to resources must be created using the resource viewhelper. It would be a lot nicer if that was not needed, and this triggered the idea of post processing values.
For the task at hand it would be sufficient to add the needed code to
TextNode, but that would not be compatible with Fluid for v4 and it seems to be better to come up with a more generic solution.
- classes implementing a certain interface can be registered with Fluid
- each class can be registered to act on only certain types of syntax tree nodes
- after a template is parsed those processors are asked to do their work on the matching nodes
That would allow to plug in a processor to adjust resource URLs as well as apply HTML escaping on all text nodes (see #5256)
|related to TYPO3.Fluid - Bug #5256: htmlspecialchars() applied inconsistently and of little use||Resolved||2009-11-06|
[+FEATURE] Fluid: Merged the changes from the parsing-interceptors branch to trunk. Now one can register interceptors with the Fluid parser to influence the parse tree building. This comes with a replacement HtmlSpecialCharsPostProcessor and adds transparent handling of resources referenced from templates. Resolves #5257.
Updated by Karsten Dambekalns over 3 years ago
See r3475 for the start of this and feel free to try it out...