Bug #62062
closedBugfix of #55457 creates JavaScript errors in frontend of TYPO3 4.5.36
0%
Description
After the update from 4.5.35 to 4.5.36 some JavaScript errors destroy powermail and imagecycle JavaScripts. When I undo Revision b2597fd4 everything works fine.
With config.spamProtectEmailAddresses = 1 the JavaScript errors can be shown in inline JavaScript in the frontend.
Tested with Safari 7.1 and Firefox 32.0.3 on OS X.
Updated by Markus Klein over 9 years ago
The referenced commit only removes HTML comments inside the script tags. What is the JS error shown?
Updated by Heinz Schilling over 9 years ago
SyntaxError: Unexpected token ')'. Expected ';' after var declaration.
TYPO3 4.5.36
function decryptString(enc,offset){ var dec=""; var len=enc.length; for(var i=0;i<len;i++){ var n="enc.charCodeAt(i); if(n">=0x2B&&n<=0x3A){ dec+=decryptCharcode(n,0x2B,0x3A,offset); }else if(n>=0x40&&n<=0x5A){ dec+=decryptCharcode(n,0x40,0x5A,offset); }else if(n>=0x61&&n<=0x7A){ dec+=decryptCharcode(n,0x61,0x7A,offset); }else{ dec+=enc.charAt(i); } } return dec; }
TYPO3 4.5.35
function decryptString(enc,offset){ var dec=""; var len=enc.length; for(var i=0;i<len;i++){ var n=enc.charCodeAt(i); if(n>=0x2B&&n<=0x3A){ dec+=decryptCharcode(n,0x2B,0x3A,offset); }else if(n>=0x40&&n<=0x5A){ dec+=decryptCharcode(n,0x40,0x5A,offset); }else if(n>=0x61&&n<=0x7A){ dec+=decryptCharcode(n,0x61,0x7A,offset); }else{ dec+=enc.charAt(i); } } return dec; }
In TYPO3 4.5.36 there are now some strange " in the JavaScript code. For Example in line
var n="enc.charCodeAt(i);
or in line
if(n">=0x2B&&n<=0x3A){
Hope this helps.
Updated by Markus Klein over 9 years ago
- Is Regression changed from Yes to No
Alright, this is indeed not good, but IMO not related to #55457.
Updated by Markus Klein over 9 years ago
- Status changed from New to Needs Feedback
I verified this with a live site from us, which is on latest 4.5 branch. Can't reproduce the issue there.
What extensions do you use? Any one modifying the HTML/JS output?
Updated by Heinz Schilling over 9 years ago
I made a fresh 4.5.36 installation with introduction package and the following options:
config.spamProtectEmailAddresses = 1 config.spamProtectEmailAddresses_atSubst = (at) config.removeDefaultJS = 0
Can't reproduce the issue there. I have to look which extension fails.
Updated by Markus Klein over 9 years ago
- Status changed from Needs Feedback to Closed
Updated by Björn Heinermann over 9 years ago
Hi all,
the ts configuration config.xhtml_cleaning = all destroy the javascript code. If I comment out the parameter, everything works fine.
Best wishes
Björn
Updated by Heinz Schilling over 9 years ago
Can confirm information from Björn. Thank you.
Updated by Pascal Naujoks over 9 years ago
Can confirm Björns solution in 4.5.38. Thanks!