Project

General

Profile

Actions

Bug #88174

closed

PageTitle should allow quotation marks

Added by Michael Rainer over 5 years ago. Updated over 5 years ago.

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

100%

Estimated time:
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

Actions #1

Updated by Michael Rainer over 5 years 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

Actions #2

Updated by Michael Rainer over 5 years ago

  • % Done changed from 0 to 100
Actions #3

Updated by Susanne Moog over 5 years ago

  • Status changed from New to Closed
Actions

Also available in: Atom PDF