diff --git a/Classes/Hooks/BootstrapLinkHandler.php b/Classes/Hooks/BootstrapLinkHandler.php index 5cba649..12b9080 100644 --- a/Classes/Hooks/BootstrapLinkHandler.php +++ b/Classes/Hooks/BootstrapLinkHandler.php @@ -100,20 +100,18 @@ public function canHandleLink(array $linkParts) { if ( ! $linkParts['url']) { return false; } - if ( substr($linkParts['url'], 0, 10) !== 'bootstrap:' ) { + if ( $linkParts['type'] != 'bootstrap' ){ return false; } - $this->linkParts = $linkParts; + $this->linkParts = $linkParts['url']; // get type from e.g. url = "bootstrap:type=popover" - $partOne = explode(':', $linkParts['url'], 2); + $partOne = explode(':', $linkParts['url']['url'], 2); if ( isset($partOne[1]) ) { list($typeKey, $typeValue) = explode('=', $partOne[1], 2); // get type from e.g. url = "bootstrap:type=popover&desc=TestPopover&pos=right&trigger=click" - if ( isset($linkParts['data-htmlarea-external']) && $linkParts['data-htmlarea-external'] == 1 ) { - list($typeValue, $linkParts['params']) = explode('&', $typeValue, 2); - } + list($typeValue, $linkParts['params']) = explode('&', $typeValue, 2); if( $typeKey == 'type' ) { $this->activeTab = $typeValue; @@ -314,4 +312,4 @@ protected function getTabContentWrapped($type, $innerHtml) { } -?> \ No newline at end of file +?> diff --git a/Classes/Hooks/LinkHandler.php b/Classes/Hooks/LinkHandler.php index 8df1fb8..1131209 100644 --- a/Classes/Hooks/LinkHandler.php +++ b/Classes/Hooks/LinkHandler.php @@ -109,7 +109,7 @@ public function modifyParamsLinksRte($parameters, $parentObj) { * @return array */ protected function getKeyValueArray($valueString) { - $keyValuePairs = explode('&', $valueString); + $keyValuePairs = explode('&', html_entity_decode($valueString)); $keyValueArray = array(); if ( is_array($keyValuePairs) ) { foreach ( $keyValuePairs as $keyValue ) { @@ -122,4 +122,4 @@ protected function getKeyValueArray($valueString) { } -?> \ No newline at end of file +?> diff --git a/ext_localconf.php b/ext_localconf.php index 6c3dbb4..05d6eda 100644 --- a/ext_localconf.php +++ b/ext_localconf.php @@ -18,10 +18,10 @@ } else { // --- Hook in TYPO3\CMS\Core\Html\RteHtmlParser.php and TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer --- - $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_content.php']['typolinkLinkHandler']['bootstrap'] = 'EXT:bootstrap_links/Classes/Hooks/LinkHandler.php:&Laxap\BootstrapLinks\Hooks\LinkHandler'; + $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_content.php']['typolinkLinkHandler']['bootstrap'] = 'Laxap\BootstrapLinks\Hooks\LinkHandler'; if ( isset($extConf['addBootstrapLinkStyles']) && $extConf['addBootstrapLinkStyles'] ) { \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(''); } } -?> \ No newline at end of file +?>