joomla / joomla-cms

Home of the Joomla! Content Management System
https://www.joomla.org
GNU General Public License v2.0
4.76k stars 3.64k forks source link

[5.1] Problem with encoding in pop-up #43013

Closed Kostelano closed 2 months ago

Kostelano commented 7 months ago

Steps to reproduce the issue

Install a nightly build + several languages that use encodings other than en-GB. For example - Russian, Ukrainian, Belarusian languages (utf-8). Accordingly, set the language for the admin panel from these languages.

Go to plugins and disable, for example: Content - Smart Search, System - Redirect.

Go one by one to the smart search and redirect components. You will see a notification about disabled plugins. Click on the link, there is a rebus in the title.

Screenshot_11

This is probably due to the PR for modal pop-ups, because I have already found problems with “recognizing” the HTML code for special characters in pop-ups.

Screenshot_2

brianteeman commented 2 months ago

I assume this has been fixed elsewhere as I cannot replicate the reported problem

image

image

Kostelano commented 2 months ago

I assume this has been fixed elsewhere as I cannot replicate the reported problem

Here we have actually fixed it, since the problem was left unattended - the "arrow" has been replaced with a word.

In other pop-up the problem still exists. There the language is simply in the UTF-8 encoding (see the 1st screenshot).

brianteeman commented 2 months ago

what arrow ???

image

Kostelano commented 2 months ago

what arrow ???

It doesn't matter, it was in our language before.

As for the problem, you can add a Cyrillic letter to the COM_REDIRECT_EDIT_PLUGIN_SETTINGS line of the en-GB language, save in UTF-8 and go to System - Redirects, click on the Redirect System Plugin link.

Screenshot_1

Fedik commented 2 months ago

About the arrow, you should use simple text, just replace → with real arrow simbol (the HTML is not allowed anymore :smiley: ): https://github.com/joomla/joomla-cms/blob/481a5d6f9fa65b3adad3d32b57e7d96a6c4e0c0d/build/media_source/plg_system_shortcut/js/shortcut.es6.js#L149

About the plugin editing, I can confirm the issue.

Fedik commented 2 months ago

The problem comes from $app->enqueueMessage() https://github.com/joomla/joomla-cms/blob/a7f5e500072575fd9cf4974926d44a38b7fec88b/libraries/src/Application/CMSApplication.php#L247-L250

Which doing extra filtering and destroys UTF-8 encoded symbols

Fedik commented 2 months ago

Please test https://github.com/joomla/joomla-cms/pull/43874