Project

General

Profile

Feature #23762

Updated by Mathias Schreiber over 9 years ago

I noticed that TYPO3 seems to have problems on using internal-chars within dataWrap'ped typoscript-values. 

 Internal-Chars are f.e.: 
 the pipe "|" 
 curls like ( ) { } 

 The only "hack" figured out by myself is to use a LOAD_REGISTER where ever possible to avoid using the chars them-self within Typoscript values/wraps. 

 There should be a more programmer friendly way to solve this! 

 My recommendation: Make Typoscript handle "escapes" like they work in RegEXP (escape-sequences f.e. "\"). 

 f.e.    output curls:     \{    \(      <-- THESE WILL BE HANDLED AS TEXT IN TS! 



 



 Example: 

 DOES NOT WORK: 

 -- TS-Setup -- 
 10 = TEXT 
 10.dataWrap = {THIS SHOULD BE SHOWN AS TEXT WITH CURL} 

 20 = TEXT 
 20.dataWrap ( 
     <script language="text/javascript"> 
      // Curls may be very annoing using Javascript with InsertData/Registers in Typoscript!!! 
     // example: 
     function test() { 
        // THIS WILL NOT RENDER CORRECTLY WITH CURLS! 
     } 

     // another example: 
    var JSON={value:test}    // CRASH: DOES NOT RENDER OUT AS SHOWN HERE! 
     </script> 
 ) 

 DOES WORK 
 10 = COA 
 10.1 = LOAD_REGISTER 
 10.1.openCurl = { 
 10.1.closeCurl = } 

 10.10 = TEXT 
 10.10.dataWrap = {register:openCurl}THIS SHOULD BE SHOWN AS TEXT WITH CURL{register:closeCurl} 

 20.20 = TEXT 
 20.20.dataWrap ( 
     <script language="text/javascript"> 
      // Curls may be very annoing using Javascript with InsertData/Registers in Typoscript!!! 
     // example: 
     function test() {register:openCurl} 
        // THIS HACK WILL WORK! 
     {register:closeCurl} 

     // another example: 
    var JSON={register:openCurl}value:test{register:closeCurl} 
     </script> 
 ) 

 I hope this Hack will work for anybody having the issue like me. 
 
 (issue imported from #M16881)

Back