Bug #80422

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

Added by Thomas Hezel about 2 years ago. Updated over 1 year ago.

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

0%

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">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="http://mapbox.com">Mapbox</a>',
maxZoom: 18
}).addTo(map);

]]>

</script>

History

#1 Updated by Jan Greth over 1 year 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">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="http://mapbox.com">Mapbox</a>',
maxZoom: 18
}).addTo(map);

]]>

</script>

#2 Updated by Benni Mack over 1 year ago

  • Project changed from 1664 to TYPO3 Core
  • TYPO3 Version set to 8

#3 Updated by Andreas Kiessling over 1 year 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.

#4 Updated by Andreas Kiessling over 1 year ago

Might also be linked to #75138

#5 Updated by Susanne Moog over 1 year ago

  • Category set to Fluid

Also available in: Atom PDF