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

BO - Import - Popup for data import has non-escaped text #29959

Closed
2 tasks done
florine2623 opened this issue Oct 11, 2022 · 5 comments · Fixed by #30415
Closed
2 tasks done

BO - Import - Popup for data import has non-escaped text #29959

florine2623 opened this issue Oct 11, 2022 · 5 comments · Fixed by #30415
Assignees
Labels
8.0.x Branch BO Category: Back Office Bug Type: Bug Import / Export Label: Which BO under menu is concerned Regression Type: regression Trivial Severity: trivial bug > https://build.prestashop.com/news/severity-classification Verified The issue has been reproduced
Milestone

Comments

@florine2623
Copy link
Contributor

Prerequisites

Describe the bug and add screenshots

When I do an import, at the end, there's a popup.
This popup should not have non escaped text:
Screenshot 2022-10-11 at 14 18 05

It's a regression, it 1.7.8.7, it looked normal:
Screenshot 2022-10-11 at 15 21 19

Expected behavior

I should see the text without the HTML elements.

Steps to reproduce

  1. Go to BO > Advanced Parameters > Import
  2. Download import file of your choice
  3. Choose your file to import > match all fields > Import
  4. See the popup appear at the end

PrestaShop version(s) where the bug happened

8.0.x, develop

PHP version(s) where the bug happened

7.4

If your bug is related to a module, specify its name and its version

No response

@florine2623 florine2623 added Bug Type: Bug Trivial Severity: trivial bug > https://build.prestashop.com/news/severity-classification Import / Export Label: Which BO under menu is concerned Regression Type: regression New New issue not yet processed by QA BO Category: Back Office 8.0.x Branch Needs Specs Status: issue needs to be specified labels Oct 11, 2022
@sallemiines
Copy link
Contributor

Hello @florine2623

Thanks for reporting the issue.
I reproduce the issue with PS1778 OK , PS1787 OK , develop / ps80x NOK , and PS800 OK ,
see the attached screen shot for develop/80x
Import • prestashop

see the attached screen shot for 800

Import • rc_800

Thank you !

@sallemiines sallemiines added Verified The issue has been reproduced and removed New New issue not yet processed by QA labels Oct 11, 2022
@thomasDelaporte
Copy link

thomasDelaporte commented Nov 4, 2022

Hey,

It seems to me to be related to the modification of @yanmakouf (#29584) . If I understand a little the differences between 1.7.8 and 8.0.x, before the function htmlspecialchars was applied only on the text so in our case "[1]%percentage%[/1]% validated" while now the whole translation with the tags is passed in this function what makes that it is displayed as text.

I can't go further in solving the problem because I don't know the reasons of these changes.

For a quick solution, we can add the attribute html="true" in the template:
{l s="[1]%percentage%[/1]% validated" sprintf=[ '[1]' => '<span id="validate_progression_done">', '%percentage%' => '0', '[/1]' => '</span>' ] d="Admin.Advparameters.Notification" html="true"}

Good luck!

@MatShir MatShir added this to Not ready in PrestaShop 8.0.x via automation Nov 4, 2022
@prestashop-issue-bot prestashop-issue-bot bot moved this from Not ready to Blocked in PrestaShop 8.0.x Nov 7, 2022
@eshraw
Copy link

eshraw commented Nov 7, 2022

Is it related to #29940 ?

@thomasDelaporte
Copy link

thomasDelaporte commented Nov 7, 2022

It seems related, I have the same problem where in the method replaceSpecialCharsWithLegacyFunctions, the variable $message includes the whole sentence:

For example <b>Visiteur</b> - Toutes les personnes n'ayant pas de compte client ou n'étant pas identifiées. and that if I do a htmlspecialchars it makes it display as text and more as an HTML element.

code

@mflasquin mflasquin self-assigned this Nov 27, 2022
@prestashop-issue-bot prestashop-issue-bot bot moved this from Blocked to In progress in PrestaShop 8.0.x Nov 28, 2022
@MatShir MatShir moved this from In progress to To be reviewed in PrestaShop 8.0.x Dec 14, 2022
@jolelievre jolelievre moved this from To be reviewed to Done in PrestaShop 8.0.x Jan 16, 2023
@jolelievre
Copy link
Contributor

Fixed by #30415

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.0.x Branch BO Category: Back Office Bug Type: Bug Import / Export Label: Which BO under menu is concerned Regression Type: regression Trivial Severity: trivial bug > https://build.prestashop.com/news/severity-classification Verified The issue has been reproduced
Projects
Development

Successfully merging a pull request may close this issue.

7 participants