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

feat(search): STRF-8350 Fixed the special characters display issue in the search results page #1662

Merged
merged 1 commit into from
Apr 23, 2020

Conversation

bc-krishsenthilraj
Copy link
Contributor

@bc-krishsenthilraj bc-krishsenthilraj commented Apr 22, 2020

What?

Special Characters are displaying as Unicode when using the Storefront Search as shown in the below ticket.

This is because search term was not escaped before displaying. With this fix, search query is properly escaped/sanitized before displaying in the SF.

Tickets / Documentation

Testing Steps

  1. Login to CP
  2. Navigate to Storefront
  3. Upload the theme file (Cornerstone-4.5.0_Fix_8350) with the fix attached to the above ticket (STRF-8350) and apply it
  4. Search in the Storefront with a term which has special character in it like test's or test"s
  5. Search results page will not display any unicode/un-escaped characters

Screenshots (if appropriate)

  1. searched with single quote (')
    image

  2. searched with double quote (")
    image

  3. quick search modal also showing escaped search term
    image

ping @bigcommerce/artemis-dt @bigcommerce/storefront-team

@bigbot
Copy link

bigbot commented Apr 22, 2020

Autotagging @bigcommerce/storefront-team @davidchin

lord2800
lord2800 previously approved these changes Apr 22, 2020
Copy link
Contributor

@lord2800 lord2800 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to be sure, can you take a screenshot of you searching for <script>alert(1)</script> please? 🙏

@bc-krishsenthilraj
Copy link
Contributor Author

tested for ES-1033 security attack fix as well

image

bc-williamkwon
bc-williamkwon previously approved these changes Apr 22, 2020
@bc-aodvak
Copy link

Screen Shot 2020-04-22 at 2 06 03 PM

Screen Shot 2020-04-22 at 2 07 03 PM

looks good 💚

@bc-williamkwon bc-williamkwon merged commit 5bc3926 into bigcommerce:master Apr 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants