Bug #37710
config.extTarget = _blank does nothing
| Status: | Needs Feedback | Start date: | 2012-06-03 | |
|---|---|---|---|---|
| Priority: | Should have | Due date: | ||
| Assignee: | - | % Done: | 0% |
|
| Category: | Content Rendering | |||
| Target version: | 4.7.2 | |||
| TYPO3 Version: | 4.7 | Complexity: | ||
| PHP Version: | ||||
| Votes: | 9 (View) |
Description
Since 4.7 target="_blank" disappeared from all external links, config.extTarget = _blank has no effect at all.
History
Updated by Jigal van Hemert 12 months 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 11 months ago
Same problem here, and I use XHTML 1.0 Transitional.
Updated by robert breithuber 11 months 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 11 months 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 11 months 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 11 months ago
@robert : 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 11 months ago
@Jigal: oh, sorry, yes you are correct, target for anchors are indeed allowed for anchors in xhtml 1.0 transitional.
Updated by Loek Hilgersom 8 months 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 Paula Auwehla 2 months 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 1 day 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.