diff --git a/typo3/sysext/backend/Classes/Controller/EditDocumentController.php b/typo3/sysext/backend/Classes/Controller/EditDocumentController.php
index b72eaf22b466c2b4284a0cbdaa33cb6a4063f24d..82a35487f759d14d67783fbeb24db925956a5586 100644
--- a/typo3/sysext/backend/Classes/Controller/EditDocumentController.php
+++ b/typo3/sysext/backend/Classes/Controller/EditDocumentController.php
@@ -1730,26 +1730,17 @@ class EditDocumentController
             && !empty($this->firstEl['table'])
             && $this->getTsConfigOption($this->firstEl['table'], 'showHistory')
         ) {
-            $historyButtonOnClick = 'window.location.href=' .
-                GeneralUtility::quoteJSvalue(
-                    (string)$this->uriBuilder->buildUriFromRoute(
-                        'record_history',
-                        [
-                            'element' => $this->firstEl['table'] . ':' . $this->firstEl['uid'],
-                            'returnUrl' => $this->R_URI,
-                        ]
-                    )
-                ) . '; return false;';
-
+            $historyUrl = (string)$this->uriBuilder->buildUriFromRoute('record_history', [
+                'element' => $this->firstEl['table'] . ':' . $this->firstEl['uid'],
+                'returnUrl' => $this->R_URI,
+            ]);
             $historyButton = $buttonBar->makeLinkButton()
-                ->setHref('#')
+                ->setHref($historyUrl)
+                ->setTitle('Open history of this record')
                 ->setIcon($this->moduleTemplate->getIconFactory()->getIcon(
                     'actions-document-history-open',
                     Icon::SIZE_SMALL
-                ))
-                ->setOnClick($historyButtonOnClick)
-                ->setTitle('Open history of this record')
-                ;
+                ));
 
             $buttonBar->addButton($historyButton, $position, $group);
         }
diff --git a/typo3/sysext/backend/Classes/Form/Container/InlineControlContainer.php b/typo3/sysext/backend/Classes/Form/Container/InlineControlContainer.php
index 06123aa3790edb680c83089ad8332a9781520c0b..99a449ce64df821bca6df66c04c750ecc34a21ab 100644
--- a/typo3/sysext/backend/Classes/Form/Container/InlineControlContainer.php
+++ b/typo3/sysext/backend/Classes/Form/Container/InlineControlContainer.php
@@ -598,7 +598,6 @@ class InlineControlContainer extends AbstractContainer
      */
     protected function renderPossibleRecordsSelectorTypeSelect(array $config, array $uniqueIds)
     {
-        $onChange = '';
         $possibleRecords = $config['selectorOrUniquePossibleRecords'];
         $nameObject = $this->inlineStackProcessor->getCurrentStructureDomObjectIdPrefix($this->data['inlineFirstPid']);
         // Create option tags:
@@ -628,7 +627,7 @@ class InlineControlContainer extends AbstractContainer
             }
             $item .= '
             <span class="input-group-btn">
-                <a href="#" class="btn btn-default" onclick="' . htmlspecialchars($onChange) . '" title="' . $createNewRelationText . '">
+                <a href="#" class="btn btn-default" title="' . $createNewRelationText . '">
                     ' . $this->iconFactory->getIcon('actions-add', Icon::SIZE_SMALL)->render() . $createNewRelationText . '
                 </a>
             </span>';