Project

General

Profile

Actions

Bug #99503

closed

Inline script concatenation requires scripts to have trailing ";"

Added by Jonas Eberle over 1 year ago. Updated 6 months ago.

Status:
Resolved
Priority:
Must have
Assignee:
-
Category:
Frontend
Target version:
-
Start date:
2023-01-10
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
12
PHP Version:
Tags:
javascript
Complexity:
easy
Is Regression:
Sprint Focus:

Description

concatenateJs produces invalid JavaScript if scripts do not end with ';'.

In JavaScript ';' line endings are optional, but when concatenating scripts a ';' (or a line feed) needs to be added.

Minimum reproducible example:

(TypoScript settings)

config.concatenateJs = 1  
page.jsInline {
  script1 = TEXT
  script1.value = alert(1)
  script2 = TEXT
  script2.value = alert(2)
}

This results in

alert(1)alert(2)

(This applies to concatenated files in any of the PAGE.includeJS functions and friends, too)


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #102328: Regression in cObjGetResolved2023-11-06

Actions
Actions

Also available in: Atom PDF