Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not decode entities in page names #1179

Merged
merged 2 commits into from Jan 14, 2020
Merged

Conversation

leofeyer
Copy link
Member

Fixes #473

Since insert tags are now removed recursively, we do not need the StringUtil::stripInsertTags() call in the PageRegular class anymore.

@leofeyer leofeyer added the bug label Jan 14, 2020
@leofeyer leofeyer added this to the 4.9 milestone Jan 14, 2020
@leofeyer leofeyer self-assigned this Jan 14, 2020
@@ -210,7 +210,7 @@ protected function prepare($objPage)
}

// Assign the title and description
$this->Template->title = StringUtil::stripInsertTags($this->replaceInsertTags($objLayout->titleTag)); // see #7097
$this->Template->title = $this->replaceInsertTags($objLayout->titleTag);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we should strip_tags() though? What if I'm using the {{br}} insert tag? Or whatever insert tag that generates HTML?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We did not strip HTML tags before, but I guess it cannot hurt. Added in 31a2454.

aschempp
aschempp previously approved these changes Jan 14, 2020
Copy link
Member

@aschempp aschempp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes have been added in 2.6.3 (contao/core@28f57b7), unfortunately there's no note about why it was added.

I can already tell you there will be issues (like what @Toflar mentioned or the XML feed), but I think changing it is the correct approach and then we need to fix appearing issues in the long run.

@leofeyer
Copy link
Member Author

I agree – even though the page title is never used in the XML sitemap.

@leofeyer leofeyer merged commit 29068c0 into master Jan 14, 2020
@leofeyer leofeyer deleted the bugfix/page-title-entities branch January 14, 2020 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Entities are not decoded in news/event titles
3 participants