Project

General

Profile

Actions

Bug #80422

open

TYPO3 8.6.1 mixing FLUID and JS - CDATA doesn't work as before

Added by Thomas Hezel about 7 years ago. Updated about 4 years ago.

Status:
New
Priority:
Must have
Assignee:
-
Category:
Fluid
Target version:
-
Start date:
2017-03-23
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

This worked until 7.6 but in 8.6.1 CDATA seems to have a different behavior inside a Fluidtemplate.
Inside the CDATA-section {s} and {z} are not escaped but omitted.

<script>
var lati = {field.lati};
var longi = {field.longi};
var map = L.map('map', {zoomControl: false}).setView([{field.lati}, {field.longi}], 13);

<![CDATA[
L.tileLayer('http://{s}.tiles.mapbox.com/v3/uhradone.ija63bia/{z}/{x}/{y}.png', {
attribution: 'Map data © <a href="http://openstreetmap.org&quot;&gt;OpenStreetMap&lt;/a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/&quot;&gt;CC-BY-SA&lt;/a&gt;, Imagery © <a href="http://mapbox.com&quot;&gt;Mapbox&lt;/a&gt;',
maxZoom: 18
}).addTo(map);

]]>

</script>

Actions #1

Updated by Jan Greth over 6 years ago

Same Bug occures here in CMS 8.7.4 - Are there any news?

Thomas Hezel wrote:

This worked until 7.6 but in 8.6.1 CDATA seems to have a different behavior inside a Fluidtemplate.
Inside the CDATA-section {s} and {z} are not escaped but omitted.

<script>
var lati = {field.lati};
var longi = {field.longi};
var map = L.map('map', {zoomControl: false}).setView([{field.lati}, {field.longi}], 13);

<![CDATA[
L.tileLayer('http://{s}.tiles.mapbox.com/v3/uhradone.ija63bia/{z}/{x}/{y}.png', {
attribution: 'Map data © <a href="http://openstreetmap.org&quot;&gt;OpenStreetMap&lt;/a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/&quot;&gt;CC-BY-SA&lt;/a&gt;, Imagery © <a href="http://mapbox.com&quot;&gt;Mapbox&lt;/a&gt;',
maxZoom: 18
}).addTo(map);

]]>

</script>

Actions #2

Updated by Benni Mack over 6 years ago

  • Project changed from 1664 to TYPO3 Core
  • TYPO3 Version set to 8
Actions #3

Updated by Andreas Kiessling about 6 years ago

I don't know if the description from Thomas is what i stumpled up on: CDATA blocks are completely omitted from my output.
AFAIR they were not touched at all in previous versions, which was sometimes needed if the output contains a lot of curly braces and Fluid would choke on it otherwise.

Actions #4

Updated by Andreas Kiessling about 6 years ago

Might also be linked to #75138

Actions #5

Updated by Susanne Moog about 6 years ago

  • Category set to Fluid
Actions #6

Updated by Riccardo De Contardi about 4 years ago

<f:format.cdata> or the instruction {parsing off} can be of help here? (I didn't test by myself).

Actions

Also available in: Atom PDF