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

Do not decode entities in page names #1179

merged 2 commits into from Jan 14, 2020

Conversation

@leofeyer
Copy link
Member

leofeyer commented Jan 14, 2020

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 defect label Jan 14, 2020
@leofeyer leofeyer added this to the 4.9 milestone Jan 14, 2020
@leofeyer leofeyer requested review from ausi, Toflar, bytehead and aschempp 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);

This comment has been minimized.

Copy link
@Toflar

Toflar Jan 14, 2020

Member

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

This comment has been minimized.

Copy link
@leofeyer

leofeyer Jan 14, 2020

Author Member

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

Copy link
Contributor

aschempp left a comment

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

This comment has been minimized.

Copy link
Member Author

leofeyer commented Jan 14, 2020

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

@leofeyer leofeyer requested review from Toflar and aschempp Jan 14, 2020
@Toflar
Toflar approved these changes Jan 14, 2020
@leofeyer leofeyer merged commit 29068c0 into master Jan 14, 2020
9 checks passed
9 checks passed
Coverage
Details
Coding Style
Details
PHP 7.2
Details
PHP 7.3
Details
PHP 7.4
Details
Prefer Lowest
Details
Bundles
Details
Windows
Details
codecov/project 89.72% remains the same compared to 735df94
Details
@leofeyer leofeyer deleted the bugfix/page-title-entities branch Jan 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.