Project

General

Profile

Actions

Bug #96723

closed

EmailViewHelper escapes linktext

Added by Christina Böhme about 2 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Frontend
Start date:
2022-02-01
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
11
PHP Version:
Tags:
Complexity:
Is Regression:
Yes
Sprint Focus:

Description

Since 11.5.5 the linktext is escaped with htmlspecialchars(). This conflicts with the use of markup in spamProtectEmailAddresses_atSubst or spamProtectEmailAddresses_lastDotSubst like

config.spamProtectEmailAddresses_atSubst = <span class="at"></span>

or additional markup for Icons and such.

Anyone know if that is intentional? Feels like a regression to me.

See https://forge.typo3.org/issues/96483


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #96483: EmailViewHelper does not use typolinkClosedBenni Mack2022-01-07

Actions
Actions #1

Updated by Christina Böhme about 2 years ago

  • Description updated (diff)
Actions #2

Updated by Georg Ringer about 2 years ago

  • Related to Bug #96483: EmailViewHelper does not use typolink added
Actions #3

Updated by Oliver Hader about 2 years ago

  • Status changed from New to Needs Feedback

I could not reproduce using regular rich-text with the following TypoScript settings in TYPO3 v11.5.6.

config.spamProtectEmailAddresses = 2
config.spamProtectEmailAddresses_atSubst = <!--nomorespam--><span class="at"></span>

Outputs the following:

<a href="#" data-mailto-token="ocknvq,qnkxgtBvarq50qti" data-mailto-vector="2">oliver<!--nomorespam--><span class="at"></span>typo3.org</a>

How is the link generated on your side?

Actions #4

Updated by Gerrit Code Review about 2 years ago

  • Status changed from Needs Feedback to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/73355

Actions #5

Updated by Oliver Hader about 2 years ago

  • Status changed from Under Review to Needs Feedback
Actions #6

Updated by Oliver Hader about 2 years ago

Just pushed a test-case for the mentioned scenario "markup in atSubst" to https://review.typo3.org/c/Packages/TYPO3.CMS/+/73355

Actions #7

Updated by Christina Böhme about 2 years ago

I have a tt_address item in list view and a custom fluid template. This is the relevant part in the Address partial:

<f:section name="contact">
    <p class="paragraph">
        <f:if condition="{address.email}">
            {f:translate(key:'label.email')}
            <f:link.email email="{address.email}" class="content-text-image__anchor anchor anchor--underline" />
        </f:if>
    </p>
</f:section>

Which gives me this output for the mailto link:

<a class="content-text-image__anchor anchor anchor--underline" href="#" data-mailto-token="hvdgoj5cvin9oznozmVozno9xjh" data-mailto-vector="-5">hans.tester&lt;span class=&quot;at&quot;&gt;&lt;/span&gt;test&lt;span class=&quot;dot&quot;&gt;&lt;/span&gt;com</a>
Actions #8

Updated by Gerrit Code Review about 2 years ago

  • Status changed from Needs Feedback to Under Review

Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/73355

Actions #9

Updated by Gerrit Code Review about 2 years ago

Patch set 1 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/73287

Actions #10

Updated by Oliver Hader about 2 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #11

Updated by Oliver Hader about 2 years ago

  • Status changed from Resolved to Accepted
Actions #12

Updated by Oliver Hader about 2 years ago

  • Status changed from Accepted to Resolved
Actions #13

Updated by Gerrit Code Review about 2 years ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/73363

Actions #14

Updated by Gerrit Code Review about 2 years ago

Patch set 1 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/73364

Actions #15

Updated by Gerrit Code Review about 2 years ago

Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/73363

Actions #16

Updated by Oliver Hader about 2 years ago

Hey Christina, thanks for providing examples - this helped me to understand, that the flaw is in the view-helper implementation, and not to be located in typolink (which seemed to be fine already).

Actions #17

Updated by Gerrit Code Review about 2 years ago

Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/73363

Actions #18

Updated by Gerrit Code Review about 2 years ago

Patch set 2 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/73364

Actions #19

Updated by Christina Böhme about 2 years ago

The patch is working for me, thanks Oliver!

Actions #20

Updated by Gerrit Code Review about 2 years ago

Patch set 4 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/73363

Actions #21

Updated by Gerrit Code Review about 2 years ago

Patch set 3 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/73364

Actions #22

Updated by Oliver Hader about 2 years ago

  • Status changed from Under Review to Resolved
Actions #23

Updated by Benni Mack over 1 year ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF