Project

General

Profile

Actions

Bug #29782

closed

RTE marks email links as extern when there is an external link before the email link

Added by Roland Hager about 13 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Should have
Category:
RTE (rtehtmlarea + ckeditor)
Target version:
Start date:
2011-09-14
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
4.4
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

I guess the subject is self explanatory. The problem is always reproducible.

Our TYPO3 version: 4.4.10
rtehtmlarea version: 2.0.9

Example:

Switch the textmode on (do not disable the RTE) and paste the following HTML-code. You have to set the href for the internal link according to your site.

    <p><a href="http://typo3.org/">EXTERNAL-TEST-URL</a></p>
    <p><a href="mailto:NOT_OK@domain.com">email link NOT OK</a></p>

    <p><a href="http://YOUR.DOMAIN.HERE/?id=2">INTERNAL-TEST-URL</a></p>
    <p><a href="mailto:OK@domain.com">email link OK</a></p> 

This will result in:

    <p><a external="1" href="http://typo3.org/">EXTERNAL-TEST-URL</a></p>
    <p><a external="1" href="mailto:NOT_OK@domain.com">email link NOT OK</a></p>

    <p><a href="http://YOUR.DOMAIN.HERE/?id=2">INTERNAL-TEST-URL</a></p>
    <p><a href="mailto:OK@domain.com">email link OK</a></p>  

When you disable the RTE after inserting the above you'll find the email links marked as external looking as follows (the mailto: should not be there!):

  <link mailto:NOT_OK@domain.com>email link NOT OK</link>

Strange but true, if you add an internal link, the following email links are recognized just fine as demonstrated by the example.

As a quick work around I added the following to my RTE pageTS-Config:

  RTE.default.proc{
    entryHTMLparser_db = 1
    entryHTMLparser_db {
       tags {
        a{
            allowedAttribs = href,class
            }
      }
    }
  }

The RTE still adds external="1" attributes to email links but they will be filtered before the changes are written to the database and thus "mailto:" will not be handled as the protocol for that link.

Actions

Also available in: Atom PDF