0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-10 23:36:14 -05:00

Fixed encoded characters appearing for Offers in Portal

fixes https://github.com/TryGhost/Team/issues/3392

- the "price" here can contain a slash, which is encoded/escaped by default by
  i18next
- this disables the escaping to fix the text that is shown to the user
This commit is contained in:
Daniel Lockyer 2023-06-07 08:35:40 +02:00
parent 05b854e156
commit 5f860c6e31
No known key found for this signature in database

View file

@ -533,7 +533,7 @@ export default class OfferPage extends React.Component {
};
const originalPrice = this.getOriginalPrice({offer, product});
const renewsLabel = t(`Renews at {{price}}.`, {price: originalPrice});
const renewsLabel = t(`Renews at {{price}}.`, {price: originalPrice, interpolation: {escapeValue: false}});
let offerLabel = '';
let useRenewsLabel = false;
@ -556,7 +556,8 @@ export default class OfferPage extends React.Component {
return (
<p className="footnote">{t('Try free for {{amount}} days, then {{originalPrice}}.', {
amount: offer.amount,
originalPrice: originalPrice
originalPrice: originalPrice,
interpolation: {escapeValue: false}
})} <span class="gh-portal-cancel">{t('Cancel anytime.')}</span></p>
);
}