[BUGFIX] HtmlArea: Use getAttribute() directly 14/52814/2
authorBenni Mack <benni@typo3.org>
Wed, 17 May 2017 08:17:07 +0000 (10:17 +0200)
committerFrank Naegler <frank.naegler@typo3.org>
Wed, 17 May 2017 12:55:12 +0000 (14:55 +0200)
RTE HtmlArea uses getAttributeNode() for gecko
browsers, however this is deprecated in current
Firefox versions.

To just get the value of an attribute getAttribute()
can be used instead:

See the usages here:
- https://www.w3schools.com/jsref/met_element_getattributenode.asp
- https://www.w3schools.com/jsref/met_element_getattribute.asp

Resolves: #80934
Releases: 7.6
Change-Id: Ic3962ad7339a56c8d0e7b94a8aaba27a56744bf8
Reviewed-on: https://review.typo3.org/52814
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Riccardo De Contardi <erredeco@gmail.com>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Frank Naegler <frank.naegler@typo3.org>
Tested-by: Frank Naegler <frank.naegler@typo3.org>
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/Plugins/TYPO3Link.js

index f3bc06e..70fad4d 100644 (file)
@@ -317,7 +317,7 @@ define(['TYPO3/CMS/Rtehtmlarea/HTMLArea/Plugin/Plugin',
                                                }
                                        }
                                        if (UserAgent.isGecko) {
-                                               node.href = decodeURI(node.getAttributeNode('href').value);
+                                               node.href = decodeURI(node.getAttribute('href'));
                                        }
                                        if (cur_target.trim()) node.target = cur_target.trim();
                                                else node.removeAttribute('target');