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

Text Area for Customizable Options shows line break html<br/> on the front end in cart area if a user enters more than 55 characters #32977

Closed
adamstapley opened this issue May 9, 2021 · 12 comments · Fixed by #33256
Assignees
Labels
Component: Checkout Fixed in 2.4.x The issue has been fixed in 2.4-develop branch 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: done Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch

Comments

@adamstapley
Copy link

Summary of the issue
We have Customizable Options with text areas where people can enter up to 350 characters. If they enter a message that's 50 characters with line breaks it all works OK and displays properly in the cart area. If they enter more than 55 characters the cart area displays the html
line break code

Preconditions (*)

Information on your environment
Running Magento 2.4.2
Dedicated server
PHP 7.3
MariaDB10.3

Steps to reproduce (*)

Steps to reproduce
Create a product in admin, create two customizable options both with text area option with 350 characters allowed. Enter less than 55 characters in one text area and more than 55 in the other both with spaces and line breaks. Add the item to your cart and you will see the html line breaks in the text area option with more than 55 characters.

Expected result (*)

Cart should just show the text entered in each option and not the html line break code

Actual result (*)

Cart shows html in option
Capture

@m2-assistant
Copy link

m2-assistant bot commented May 9, 2021

Hi @adamstapley. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

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

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

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

For more details, please, review the Magento Contributor Assistant documentation.

Please, add a comment to assign the issue: @magento I am working on this


⚠️ 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, please join the Community Contributions Triage session to discuss the appropriate ticket.

🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel

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

@adamstapley
Copy link
Author

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

@magento-deployment-service
Copy link

Hi @adamstapley. Thank you for your request. I'm working on Magento instance for you.

@adamstapley
Copy link
Author

Created a test product and issue still exist. This is a bundle product
URL: https://b8f5c5bbfe16193694e9c15ef90cc1d9-2-4-develop.instances.magento-community.engineering/checkout/cart/configure/id/5/product_id/2047/

1
2

@adamstapley
Copy link
Author

This looks like it might be related to issue #25418

I created a fix in Magento 2.4.2:
/public_html/vendor/magento/module-checkout/view/frontend/templates/cart/item/default.phtml

Line 52

escapeHtml($_formatedOptionValue['full_view']) ?>

Change to

escapeHtml($_formatedOptionValue['full_view'], ['span', 'a']) ?>

All line break code is removed. I presume this isn't the 100% correct way to achieve this but it works for me at the moment and I'm not a developer :)

@engcom-Alfa engcom-Alfa self-assigned this May 12, 2021
@m2-assistant
Copy link

m2-assistant bot commented May 12, 2021

Hi @engcom-Alfa. 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.

@adamstapley
Copy link
Author

Reproduced on 2.4.x.

@Den4ik Den4ik self-assigned this May 12, 2021
@m2-assistant
Copy link

m2-assistant bot commented May 12, 2021

Hi @Den4ik. 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.

@Den4ik Den4ik added Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch labels May 12, 2021
@m2-community-project m2-community-project bot removed Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: ready for confirmation labels May 12, 2021
@Den4ik Den4ik added Component: Checkout Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed labels May 12, 2021
@m2-community-project m2-community-project bot removed the Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed label May 12, 2021
@engcom-Alfa engcom-Alfa removed their assignment May 13, 2021
@gabrieldagama gabrieldagama added the Priority: P2 A defect with this priority could have functionality issues which are not to expectations. label May 20, 2021
@AZiniukhin
Copy link
Contributor

@magento I am working on this

@engcom-Alfa engcom-Alfa added Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed and removed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed labels Jul 1, 2021
@magento-engcom-team
Copy link
Contributor

✅ Confirmed by @engcom-Alfa
Thank you for verifying the issue. Based on the provided information internal tickets MC-42773 were created

Issue Available: @engcom-Alfa, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

@gabrieldagama
Copy link
Contributor

Hi @adamstapley. Thank you for your report.
The issue has been fixed in #33256 by @AZiniukhin in 2.4-develop branch
Related commit(s):

The fix will be available with the upcoming 2.4.3 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Checkout Fixed in 2.4.x The issue has been fixed in 2.4-develop branch 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: done Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

6 participants