[BUGFIX] Menu-links generate two empty spaces at closing anchor 82/31682/2
authorTomita Militaru <militarutomita@gmail.com>
Tue, 12 Nov 2013 15:52:33 +0000 (17:52 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Fri, 25 Jul 2014 14:08:27 +0000 (16:08 +0200)
Checks for ATagParams & access key code before adding empty
spaces between anchor parameters.

Resolves: #50566
Releases: 6.3, 6.2, 6.1
Change-Id: I57a2a2a06a97fc1eda6e0438bfdc6e210437e5bb
Reviewed-on: http://review.typo3.org/31682
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php

index c462be3..7b58247 100644 (file)
@@ -1692,7 +1692,9 @@ class AbstractMenuContentObject {
         * @todo Define visibility
         */
        public function setATagParts() {
-               $this->I['A1'] = '<a ' . GeneralUtility::implodeAttributes($this->I['linkHREF'], 1) . ' ' . $this->I['val']['ATagParams'] . $this->I['accessKey']['code'] . '>';
+               $params = trim($this->I['val']['ATagParams']) . $this->I['accessKey']['code'];
+               $params = $params !== '' ? ' ' . $params : '';
+               $this->I['A1'] = '<a ' . GeneralUtility::implodeAttributes($this->I['linkHREF'], 1) . $params . '>';
                $this->I['A2'] = '</a>';
        }