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): ES-97 fixed the html special chars issue in facet names #1637

Merged
merged 1 commit into from
Feb 14, 2020

Conversation

bc-krishsenthilraj
Copy link
Contributor

What?

As part of fixing the encoding issues for ES-97, we found that html characters are being displayed in stencil theme. This fix will address it.

Tickets / Documentation

Screenshots (if appropriate)

Broken "RefineBy" facet names

image

Fixed "RefineBy" facet names

image

@bigbot
Copy link

bigbot commented Feb 12, 2020

Autotagging @bigcommerce/storefront-team @davidchin

bc-williamkwon
bc-williamkwon previously approved these changes Feb 12, 2020
@@ -30,7 +30,7 @@ <h5 class="accordion-title">
class="navList-action navList-action--checkbox {{#if selected }} is-selected {{/if}}"
rel="nofollow"
data-faceted-search-facet>
{{ sanitize title }}
{{{ title }}}
Copy link
Contributor

Choose a reason for hiding this comment

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

We should also update the label across each of the facets.

@@ -15,7 +15,7 @@ <h5 class="sidebarBlock-heading">
{{#if facet '===' 'rating'}}
{{lang 'search.faceted.selected.rating-label' rating=title}}
{{else}}
{{ title }}
{{{ title }}}
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have made changes to all applicable files. Please review them.

junedkazi
junedkazi previously approved these changes Feb 12, 2020
junedkazi
junedkazi previously approved these changes Feb 12, 2020
@@ -7,7 +7,7 @@
rel="nofollow"
data-id="{{ id }}"
data-faceted-search-facet>
{{title}}
{{{title}}}
Copy link
Contributor

Choose a reason for hiding this comment

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

We should probably sanitize all of the titles--there's little to no reason anyone should be using html in a custom field or option value name or value.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added them.. pls review it.

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.

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.

5 participants