Skip to content

remove auto escape from page title to avoid & bug - #20402

Open
rlittle316 wants to merge 1 commit into
phpmyadmin:masterfrom
rlittle316:twig-title-ampersand
Open

remove auto escape from page title to avoid & bug#20402
rlittle316 wants to merge 1 commit into
phpmyadmin:masterfrom
rlittle316:twig-title-ampersand

Conversation

@rlittle316

@rlittle316 rlittle316 commented Jul 28, 2026

Copy link
Copy Markdown

Description

This pull request is to disable twig auto escaping on header.title. When & is used in the title with this enabled it is rendered as & in the title.

Fixes #
This fixes the incorrect title rendered when a & is passed to the title.

Before submitting pull request, please review the following checklist:

  • Make sure you have read our CONTRIBUTING.md document.
  • Make sure you are making a pull request against the correct branch. For example, for bug fixes in a released version use the corresponding QA branch and for new features use the master branch. If you have a doubt, you can ask as a comment in the bug report or on the mailing list.
  • Every commit has proper Signed-off-by line as described in our DCO. This ensures that the work you're submitting is your own creation.
  • Every commit has a descriptive commit message.
  • Every commit is needed on its own, if you have just minor fixes to previous commits, you can squash them.
  • Any new functionality is covered by tests.

Signed-off-by: Robert Little <robert.little@appian.com>
@rlittle316

Copy link
Copy Markdown
Author

Im not sure if this should be patched in the current version of phpmyadmin or not. A workaround I have found for this issue is to pre replace any & with the full width version of it which bypasses the auto escaping done by twig.

@kamil-tekiela

Copy link
Copy Markdown
Contributor

This should be fixed in 5.2, but instead of taking the raw value in Twig, I would just remove htmlspecialchars in PHP and only add it when the title is passed through AJAX. Much cleaner and more correct solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants