contao/test — Issue #493: Newsletter external link bug
Author: importer
Created: 2011-11-28 16:54:20+00:00
State: open
Labels: Defect, newsletter

If you specify a hyperlink in the newsletter editor where the text that is between the opening and closing A tag (the displayed link text) is the same as the value of the HREF attribute AND the displayed link text also displayed within the same P tag as the A tag then TL (or TinyMCE) messes up the displayed link text by prepending the base url to it.

Reproducible in my TL v2.6.2, the demo site (both 2.6.5 and 2.6.6).

To reproduce it log into the demo and go to Newsletters and create a new newsletter channel.

Then create a new newsletter and paste the following in the HTML content box:

```

And from our website you can visit our new Online Shop or click the following link now to go straight
to our shop area: Online Shop

```

Note the word "shop" in "shop area" is the same as the HREF attribute...

Now save and close then you can see in the preview area of it that it displays the following:

```
And from our website you can visit our new Online Shop or click the following link now to go straight
to our http://demo.typolight.org/shop area: Online Shop
```

What happened was that it wrongly prepends the base url to the word "shop" that was outside the A tag.

The actual A tag is constructed fine though.

The workaround is to specify the full URL in the HREF attribute of the A tag rather than a relative URL. e.g. "http://demo.typolight.org/shop" rather than just "shop".

Regards

James

--- _Originally created by jamesm on February 7th, 2009, at 12:38am (ID 493)_