[BUGFIX] Follow-up to IRRE override strategy

In #49685 a more usable behavior of the override strategy
has been introduced for FAL usages. The new output from
TCEforms (FormEngine) lacks proper escaping of JavaScript
and HTML-Code.

This followup adds proper encoding and makes the
newly introduced isNew() method more robust.

Backports of the original patch will have to include
this patch-set directly.

Resolves: #51818
Related: #49685
Releases: 6.2
Change-Id: I2914b4606de4bee0f93861a2de0574362c98d166
Reviewed-on: https://review.typo3.org/23526
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters