pimcore / admin-ui-classic-bundle

Other
7 stars 93 forks source link

Transformed value of special characters in the translations are displayed in the templates #234

Closed aryaantony92 closed 6 months ago

aryaantony92 commented 1 year ago

Please see https://github.com/pimcore/pimcore/discussions/15345#discussioncomment-6690814

aryaantony92 commented 1 year ago

Related to https://github.com/pimcore/admin-ui-classic-bundle/issues/182

cadeyrn commented 12 months ago

@aryaantony92: https://github.com/pimcore/pimcore/discussions/15345#discussioncomment-6690814 links to https://github.com/pimcore/pimcore/issues/15740 and that issue closed as fixed, as well as #182. Can this issue be fixed now?

To quote myself from https://github.com/pimcore/pimcore/issues/15827 for the rationale why I think it's important to fix:

Otherwise I would be forced to use the |raw filter for all translations in all templates as in every translation the „and“ symbol could potentially be used. That would reduce the security level of the application.

github-actions[bot] commented 7 months ago

Thanks a lot for reporting the issue. We did not consider the issue as "Pimcore:Priority", "Pimcore:ToDo" or "Pimcore:Backlog", so we're not going to work on that anytime soon. Please create a pull request to fix the issue if this is a bug report. We'll then review it as quickly as possible. If you're interested in contributing a feature, please contact us first here before creating a pull request. We'll then decide whether we'd accept it or not. Thanks for your understanding.

kingjia90 commented 6 months ago

Fixed by https://github.com/pimcore/pimcore/pull/15960

Cruiser13 commented 5 months ago

Actually this does not seem to be fixed @kingjia90 . Tested on pimcore 11.1.5 and admin-ui-classic-bundle 1.3.4.

Sample Code:

{% set headline = pimcore_input('headline') %}
{% if editmode %}
{{ headline|raw }}
{% else %}
{{ headline }}
{% endif %}

Put the following text in Backend: Marketing & Entwicklung

Will appear as Marketing & Entwicklung in frontend (non editmode)

kingjia90 commented 5 months ago

Thank you for your report!

I think it got reverted something on

https://github.com/pimcore/pimcore/commit/c5eb0a3a4f1c3b156da42bb821f9c52adc9932d6

Therefore you might be right that something may not be actually fixed as what i recall.

Could you please open a brand new issue with your described case? Will take a look then

Cruiser13 commented 5 months ago

@kingjia90 done, thanks!