Skip to content

Commit

Permalink
fix(storefront): STRF-10416 - Updates the 'description' in a product …
Browse files Browse the repository at this point in the history
…schema to use html encoding instead of url encoding. The url encoding was resulting in undesired encoded characters showing up in places the description was used, like when linking a product to pinterest.
  • Loading branch information
bc-jz committed Apr 20, 2023
1 parent 9b4f774 commit e8bc150
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Draft
- Changing 'description' in product schema to use html encoding instead of url encoding [#2350](https://github.com/bigcommerce/cornerstone/pull/2350)
- Running Lighthouse npm script fails in terminal [#2345](https://github.com/bigcommerce/cornerstone/pull/2345)
- Removed accelerated checkout integration [#2341](https://github.com/bigcommerce/cornerstone/pull/2341)
- Added css classes for ApplePay Button [[#2344]](https://github.com/bigcommerce/cornerstone/pull/2344)
Expand Down
2 changes: 1 addition & 1 deletion templates/components/products/schema.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"name": {{{JSONstringify product.brand.name}}}
},
{{/if}}
"description": "{{encodeURI (sanitize product.description)}}",
"description": {{{JSONstringify (sanitize product.description)}}},
"image": "{{getImage product.main_image 'zoom_size' (cdn theme_settings.default_image_product)}}",
{{#and settings.show_product_reviews product.reviews.list.length}}
"aggregateRating": {
Expand Down

0 comments on commit e8bc150

Please sign in to comment.