#103698RTE does not allow empty attributes for the tag "a"
Description
The method \TYPO3\CMS\Core\Html\RteHtmlParser::TS_links_db remove all empty attributes from the tag “a”.
This is needed to set the attribute download,. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#download
Possible solution.
Index: sysext/core/Classes/Html/RteHtmlParser.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/sysext/core/Classes/Html/RteHtmlParser.php b/sysext/core/Classes/Html/RteHtmlParser.php
--- a/sysext/core/Classes/Html/RteHtmlParser.php
+++ b/sysext/core/Classes/Html/RteHtmlParser.php (date 1713779033389)
@@ -356,7 +356,7 @@
$tagAttributes['href'] = $linkInformation['href'] ?? $tagAttributes['href'];
}
- $blockSplit[$k] = '<a ' . GeneralUtility::implodeAttributes($tagAttributes, true) . '>'
+ $blockSplit[$k] = '<a ' . GeneralUtility::implodeAttributes($tagAttributes, true, true) . '>'
. $this->TS_links_db($this->removeFirstAndLastTag($blockSplit[$k])) . '</a>';
}
}