Bug #37710
closedconfig.extTarget = _blank does nothing
Added by Robert Breithuber over 12 years ago. Updated about 6 years ago.
100%
Description
Since 4.7 target="_blank" disappeared from all external links, config.extTarget = _blank has no effect at all.
Updated by Jigal van Hemert over 12 years ago
- Status changed from New to Needs Feedback
Do you use XHTML Strict? XHTML Strict does not allow a target attribute in links. CSS styled content now follows those standards.
Updated by Florian Seirer over 12 years ago
Same problem here, and I use XHTML 1.0 Transitional.
Updated by Robert Breithuber over 12 years ago
Jigal van Hemert wrote:
Do you use XHTML Strict? XHTML Strict does not allow a target attribute in links. CSS styled content now follows those standards.
No.
config.doctype = xhtml_trans
Sourcecode shows:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Updated by Florian Seirer over 12 years ago
I reverted the changes back to css_styled_content 4.5.
\typo3\sysext\css_styled_content\static\setup.txt, starting line 68:
lib.parseFunc { makelinks = 1 makelinks.http.keep = {$styles.content.links.keep} # makelinks.http.extTarget < lib.parseTarget # makelinks.http.extTarget = # makelinks.http.extTarget.override = {$styles.content.links.extTarget} makelinks.http.extTarget = {$styles.content.links.extTarget} makelinks.mailto.keep = path tags { link = TEXT link { current = 1 typolink.parameter.data = parameters : allParams # typolink.extTarget < lib.parseTarget # typolink.extTarget = # typolink.extTarget.override = {$styles.content.links.extTarget} typolink.extTarget = {$styles.content.links.extTarget}
The line following the three # is from CSC 4.5.
That solved the problem, but I'm not sure if this was the right way to fix this.
Updated by Robert Breithuber over 12 years ago
You will have to use the default doctype (HTML 4.0), as XHTML does not allow link-targets at all, no matter if transitional or strict.
Thanks to Pascal Collins for pointing this out !
The Typo3 behavior is fully correct, following the standards - so this bug is invalid.
Updated by Jigal van Hemert over 12 years ago
@Robert Lemke : See http://www.w3.org/TR/2002/REC-xhtml1-20020801/dtds.html#dtdentry_xhtml1-transitional.dtd_a the dtd for xhtml transitional specifies a target attribute for the anchor element.
Updated by Robert Breithuber over 12 years ago
@Jigal van Hemert: oh, sorry, yes you are correct, target for anchors are indeed allowed for anchors in xhtml 1.0 transitional.
Updated by Loek Hilgersom about 12 years ago
It may be correct that no target is added for XHTML strict, but there is also no target added for XHTML-transitional.
What is worse, the RTE still adds a property title="Opens external link in new window", which is really inconsistent behaviour, suggesting that the target-thing still works.
Updated by Paul A. Auwehla over 11 years ago
In typo3 6.04 I can select RTE-links to open into _blank - target.
And I can give these targets a title.
And this is working, of course(!!) with XHTML.
Same in tt_news: Of course I can set external links and targets to _blank with the Link-Selector.
And of course this is working perfectly - in typo3 6.04 and XHTML.
If the w3.org decided to define and make links without target,
then they made simple total nonsense: Having targets in external links is
one of the most used features with links at all - and one of the most important features, too.
Please do not make squared wheels in typo3 even when the w3.org recommends this.
Leave the default targets-function as it is.
When in a very very very far future the browsers will not longer support this,
say when the paradies came to the internet - then it will be time to drop this feature.
Keep in mind: We are talking here about setting a default target.
Setting individual targets still works with typo3 and hopefully will work.
Updated by Henrik Ziegenhain over 11 years ago
Same here with 6.0.x
Inserting a link in the RTE without explicitly choosing a _blank target does not print the target in Frontend.
The tag only gets rendered when i choose a target in link wizard.
The descripted issue only is present, when config.doctype = html_trans is set.
Setting doctype to html5 solves the problems with the missing default extTarget. Since XHTML Trans is still supported, this issue should be solved somehow.
Updated by Alexander Opitz over 11 years ago
- Status changed from Needs Feedback to New
- Target version deleted (
4.7.2)
Updated by Jigal van Hemert over 11 years ago
@Paula : it's not about creating square wheels. Most (if not all) (semi-)government site has to comply with accessibility guidelines. Part of these guidelines is that the (x)html passes validation with the w3c validators.
I believe we need to enable the target attribute in more doctypes:
doctypes with target attribute
- xhtml basic : http://www.w3.org/2007/07/xhtml-basic-ref.html#attr_target
- xhtml 1.0 transitional : http://www.w3.org/TR/2002/REC-xhtml1-20020801/dtds.html#dtdentry_xhtml1-transitional.dtd_a
- xhtml 2.0 : http://www.w3.org/TR/xhtml2/mod-hyperAttributes.html#adef_hyperAttributes_target
- xhtml 1.0 frames : http://www.w3.org/TR/xhtml1/dtds.html#dtdentry_xhtml1-frameset.dtd_a
- html5 : http://www.w3.org/TR/html5/text-level-semantics.html#the-a-element
doctypes without target attribute
- xhtml 1.0 strict
- xhtml 1.1
- xhtml+rdfa 1.0
I'll prepare a patch for the 6.x range (4.7 is in security fix only mode).
Updated by Gerrit Code Review over 11 years ago
- Status changed from New to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/22215
Updated by Gerrit Code Review over 11 years ago
Patch set 1 for branch TYPO3_6-1 has been pushed to the review server.
It is available at https://review.typo3.org/22224
Updated by Gerrit Code Review over 11 years ago
Patch set 1 for branch TYPO3_6-0 has been pushed to the review server.
It is available at https://review.typo3.org/22225
Updated by Jigal van Hemert over 11 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 9f069f1bcb8ce03d2717e2b25ec63fcd76f531c7.
Updated by Gerrit Code Review over 11 years ago
- Status changed from Resolved to Under Review
Patch set 2 for branch TYPO3_6-0 has been pushed to the review server.
It is available at https://review.typo3.org/22225
Updated by Jigal van Hemert over 11 years ago
- Status changed from Under Review to Resolved
Applied in changeset ad95ffd0d568766471968bb2bb7dfcfb00753415.
Updated by Riccardo De Contardi over 11 years ago
I suggested some time ago to replace the whole "_blank target" with something like:
http://accessify.com/features/tutorials/the-perfect-popup/ ;)