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

Swatch attribute option containing double quotes are not correctly displayed #35495

Open
2 of 5 tasks
ganeddact opened this issue May 18, 2022 · 12 comments
Open
2 of 5 tasks
Assignees
Labels
Area: Product Component: Attributes Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: dev in progress Reported on 2.4.x Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch

Comments

@ganeddact
Copy link

ganeddact commented May 18, 2022

Preconditions and environment

  • Magento version 2.4

If a product attribute has an option that has a label containing a double quote, it's not being escaped and breaks the templating.
In these screens, size should have been "SIZE 14 (35/36") LONG" and instead only "SIZE 14 (35/36" could be read, and inspecting the HTML can be seen how the double quote broke the data-option-label attribute.
Screenshot 2022-05-18 at 15 32 54
Screenshot 2022-05-18 at 15 35 08

To make things worse, the template cannot be easily overridden in the theme because it's hardcoded, please refer to #4400 that has been closed without a fix

Steps to reproduce

  1. Set in an attribute (Example: size) a value containing double quote, like 13"
  2. Have that attribute to be displayed as a text swatch
  3. Create a product and some size variants (13", 14", 15", 13" 4', 13" LONG)
  4. The configurable product page will show the text swatch options but the text will be truncated from the ". An inspection of the HTML shows that the "data-option-label" is breaking the HTML because the double quote is not escaped correctly.

Expected result

Swatch options showing the entire label, correctly showing text after the double quote

Actual result

The swatch option label is cut from the double quote onwards

Additional information

No response

Release note

No response

Triage and priority

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
@m2-assistant
Copy link

m2-assistant bot commented May 18, 2022

Hi @ganeddact. Thank you for your report.
To speed up processing of this issue, make sure that you provided the following information:

  • Summary of the issue
  • Information on your environment
  • Steps to reproduce
  • Expected and actual results

Make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

For more details, review the Magento Contributor Assistant documentation.

Add a comment to assign the issue: @magento I am working on this

To learn more about issue processing workflow, refer to the Code Contributions.


⚠️ According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.

🕙 You can find the schedule on the Magento Community Calendar page.

📞 The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.

✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

@m2-assistant
Copy link

m2-assistant bot commented May 19, 2022

Hi @engcom-Delta. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 4. Verify that the issue is reproducible on 2.4-develop branch

    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 5. Add label Issue: Confirmed once verification is complete.

  • 6. Make sure that automatic system confirms that report has been added to the backlog.

@engcom-Lima engcom-Lima self-assigned this May 19, 2022
@m2-assistant
Copy link

m2-assistant bot commented May 19, 2022

Hi @engcom-Lima. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 4. Verify that the issue is reproducible on 2.4-develop branch

    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 5. Add label Issue: Confirmed once verification is complete.

  • 6. Make sure that automatic system confirms that report has been added to the backlog.

@engcom-Lima
Copy link
Contributor

@magento give me 2.4-develop instance

@magento-deployment-service
Copy link

Hi @engcom-Lima. Thank you for your request. I'm working on Magento instance for you.

@magento-deployment-service
Copy link

@engcom-Lima
Copy link
Contributor

Verified this issue on 2.4-develop and this issue is reproducible .Hence, confirming the issue.
Below is the screenshot :

  1. image

  2. image

  3. image

@engcom-Lima engcom-Lima added Component: Attributes Area: Product Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed labels May 19, 2022
@github-jira-sync-bot github-jira-sync-bot removed the Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed label May 19, 2022
@github-jira-sync-bot
Copy link

Unfortunately, not enough information was provided to create a Jira ticket. Please make sure you added the following label(s): Reproduced on 2.4.x, ^Area:.*

Once all required labels are present, please add Issue: Confirmed label again.

@engcom-Lima engcom-Lima added Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Reported on 2.4.x Indicates original Magento version for the Issue report. Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed labels May 19, 2022
@github-jira-sync-bot
Copy link

✅ Jira issue https://jira.corp.magento.com/browse/AC-3113 is successfully created for this GitHub issue.

@m2-assistant
Copy link

m2-assistant bot commented May 19, 2022

✅ Confirmed by @engcom-Lima. Thank you for verifying the issue.
Issue Available: @engcom-Lima, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

@m2-assistant
Copy link

m2-assistant bot commented May 19, 2022

Hi @engcom-Lima. Thank you for working on this issue.
Looks like this issue is already verified and confirmed. But if you want to validate it one more time, please, go though the following instruction:

    1. Add/Edit Component: XXXXX label(s) to the ticket, indicating the components it may be related to.
    1. Verify that the issue is reproducible on 2.4-develop branch
      Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
      - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
      - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!
    1. If the issue is not relevant or is not reproducible any more, feel free to close it.

@sdzhepa sdzhepa added the Priority: P2 A defect with this priority could have functionality issues which are not to expectations. label May 19, 2022
@engcom-Hotel engcom-Hotel moved this to Dev In Progress in High Priority Backlog Aug 19, 2024
@engcom-Delta
Copy link
Contributor

Hi @ganeddact ,

Thanks for your reporting and collaboration.
We have re-verified the issue in latest 2.4-develop instance and the issue is reproducible.
Kindly refer the screenshots.

Steps to reproduce -

  1. Set in an attribute (Example: size) a value containing double quote, like 13"
  2. Have that attribute to be displayed as a text swatch
  3. Create a product and some size variants (13", 14", 15", 13" 4', 13" LONG)
  4. The configurable product page will show the text swatch options but the text will be truncated from the ". An inspection of the HTML shows that the "data-option-label" is breaking the HTML because the double quote is not escaped correctly.
    image
    image
    image
  5. Observe ,The swatch option label is cut from the double quote onwards
    Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Product Component: Attributes Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: dev in progress Reported on 2.4.x Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch
Projects
Status: Dev In Progress
Development

No branches or pull requests

5 participants