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

fix: #7859: allow special characters in page title #7868

Merged

Conversation

jrief
Copy link
Contributor

@jrief jrief commented Apr 9, 2024

Description

Instead of escaping the page title, this PR just strips its HTML tags. This prevents XSS-attacks as well but keeps HTML entities. Otherwise a page title containing an & will be escaped to & which looks ugly in the browser's tabs.

Related resources

Checklist

  • I have opened this pull request against develop-4
  • I have added or modified the tests when changing logic
  • I have followed the conventional commits guidelines to add meaningful information into the changelog
  • I have read the contribution guidelines and I have joined #workgroup-pr-review on Slack to find a “pr review buddy” who is going to review my pull request.

@jrief jrief changed the title fix #7859: allow special characters in page title fix: #7859: allow special characters in page title Apr 9, 2024
@jrief jrief force-pushed the fix/gh-7859-special-chars-in-page-title branch from 2d8ed15 to a17fe19 Compare April 9, 2024 09:13
@jrief jrief requested a review from marksweb April 9, 2024 13:32
@fsbraun fsbraun added the 4.1 label May 17, 2024
@fsbraun fsbraun added the needs to be backported Commits need to be backported label May 22, 2024
@fsbraun fsbraun merged commit 63e50fe into django-cms:develop-4 May 22, 2024
80 checks passed
fsbraun added a commit that referenced this pull request May 22, 2024
* fix #7859: allow special characters in page title

* Update test_templatetags.py

* Fix ruff issues in test_templatetags.py

* One more time: fix ruff issues in test_templatetags.py

---------

Co-authored-by: Fabian Braun <[email protected]>
@fsbraun fsbraun mentioned this pull request May 22, 2024
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.1 needs to be backported Commits need to be backported
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants