Bug #88174

PageTitle should allow quotation marks

Added by Michael Rainer 4 months ago. Updated 4 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Start date:
2019-04-18
Due date:
% Done:

100%

TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
easy
Is Regression:
Sprint Focus:

Description

Hi all,

I want to set the page title to a string which contains quotation marks.
...
<head>
<title>Hotel xy "Single Room"</title>
</head>
...

According to W3C Validator, it's allowed to have quotation marks in the title tag.

I set the title via the PageRenderer class of the core extension ( \TYPO3\CMS\Core\Page\PageRenderer->setTitle ).
But the quotation marks will be escaped: The PageRendererClass always escapes the title via htmlspecialchars().

For example in the getPreparedMarkerArray method:

'TITLE' => $this->title ? str_replace('|', htmlspecialchars($this->title), $this->titleTag) : '',

What are your thoughts?

Kind regards,
Michael

History

#1 Updated by Michael Rainer 4 months ago

Michael Rainer wrote:

Hi all,

I want to set the page title to a string which contains quotation marks.
...
<head>
<title>Hotel xy "Single Room"</title>
</head>
...

According to W3C Validator, it's allowed to have quotation marks in the title tag.

I set the title via the PageRenderer class of the core extension ( \TYPO3\CMS\Core\Page\PageRenderer->setTitle ).
But the quotation marks will be escaped: The PageRendererClass always escapes the title via htmlspecialchars().

For example in the getPreparedMarkerArray method:

'TITLE' => $this->title ? str_replace('|', htmlspecialchars($this->title), $this->titleTag) : '',

What are your thoughts?

Kind regards,
Michael

Sorry guys,
it was a mistake by myself.
My custom viewhelper escaped the content and therefore
it was a double escaping problem.
The issue can be closed.

Cheers,
Michael

#2 Updated by Michael Rainer 4 months ago

  • % Done changed from 0 to 100

#3 Updated by Susanne Moog 4 months ago

  • Status changed from New to Closed

Also available in: Atom PDF