[BUGFIX] Use less aggressive string replace in IRRE headers 04/44104/3
authorMathias Schreiber <mathias.schreiber@wmdb.de>
Fri, 16 Oct 2015 12:45:48 +0000 (14:45 +0200)
committerMorton Jonuschat <m.jonuschat@mojocode.de>
Fri, 16 Oct 2015 14:04:48 +0000 (16:04 +0200)
The current way of cutting out the _header portion of an IRRE header was
too aggressive and might cut of unwanted parts of the id attribute.
We change the regex to only check on the end of the string to fix this.

Resolves: #54530
Releases: master
Change-Id: I935d93ad1eca7f2599ab6a91845e2fe363a9719a
Reviewed-on: http://review.typo3.org/44104
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
Reviewed-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Tested-by: Morton Jonuschat <m.jonuschat@mojocode.de>
typo3/sysext/backend/Resources/Public/JavaScript/jsfunc.inline.js

index 2740884..e4998d1 100644 (file)
@@ -48,7 +48,7 @@ var inline = {
 
                var $recordHeader = TYPO3.jQuery(this);
                inline.expandCollapseRecord(
-                       $recordHeader.attr('id').replace('_header', ''),
+                       $recordHeader.attr('id').replace(/_header$/, ''),
                        $recordHeader.attr('data-expandSingle'),
                        $recordHeader.attr('data-returnURL')
                );