[BUGFIX] Add correctly escaped css selectors for js

Because identifiers in css are using escaped entries, we
have to do another escaping for the javascript selectors.

Resolves: #56874
Releases: 6.2
Change-Id: Ie470def83409904963e8b6e89635a6734bc4088c
Reviewed-on: https://review.typo3.org/28522
Reviewed-by: Pascal Dürsteler
Tested-by: Pascal Dürsteler
Reviewed-by: Markus Klein
Tested-by: Markus Klein