Feature #6389

Option/Possibility to Disable Object Escaping

Added by Marc Neuhaus over 5 years ago. Updated almost 5 years ago.

Status:Resolved Start date:2010-02-07
Priority:Should have Due date:
Assigned To:Robert Lemke % Done:

100%

Category:Core
Target version:1.0.0 alpha 8
Has patch:

Description

Currently the ObjectAccessor will always be escaped.
In my Opinion there should be a way to Disable this behavior for certain Objects/Properties


Related issues

related to TYPO3.Fluid - Feature #6844: Remove "shut-up" operator @ Resolved 2010-03-15

Associated revisions

Revision 22df8b57
Added by Robert Lemke over 5 years ago

[~TASK] Fluid (View): Renamed the "viewData" property to "variables" because we use this term in real life. Also renamed "objects" to "variables" in the TemplateVariableContainer.
[+FEATURE] Fluid (Core): Introduced a "raw" operator which allows for disabling the interceptors for object accessor nodes. If you need to display raw data (e.g. HTML) which is stored in an object property, just prepend its object path with the "@" sign: <p>{@post.content}</p> Resolves #6389.

History

#1 Updated by Robert Lemke over 5 years ago

  • Category set to Core
  • Status changed from New to Accepted
  • Assigned To changed from Sebastian Kurfuerst to Robert Lemke
  • Target version set to 1.0.0 alpha 8

Because I needed this feature myself, I tried out different ways of making this possible. In my opinion the most convenient and still clean way is to introduce a special character in the object accessor path syntax which allows for disabling the configured interceptors.

A blog post for example contains HTML in its "content" property which should be output directly without any further escaping. Currently the post content is rendered like this:

    <p class="content"><f:format.nl2br>{post.content}</f:format.nl2br></p>

I suggest that we allow the "@" sign for disabling the interceptors:

    <p class="content"><f:format.nl2br>{@post.content}</f:format.nl2br></p>

Now Fluid would render the content HTML as is.

#2 Updated by Robert Lemke over 5 years ago

  • Status changed from Accepted to Resolved
  • % Done changed from 0 to 100

Applied in changeset r3883.

Also available in: Atom PDF