@planetaexo/design-system 0.37.4 → 0.37.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +7 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3962,6 +3962,12 @@ ${content}
|
|
|
3962
3962
|
</body>
|
|
3963
3963
|
</html>`;
|
|
3964
3964
|
}
|
|
3965
|
+
function constrainItineraryImages(html) {
|
|
3966
|
+
return html.replace(/<img\b[^>]*>/gi, (tag) => {
|
|
3967
|
+
const withoutStyle = tag.replace(/\sstyle\s*=\s*("[^"]*"|'[^']*')/gi, "");
|
|
3968
|
+
return withoutStyle.replace(/<img\b/i, '<img style="max-width:100%;height:auto"');
|
|
3969
|
+
});
|
|
3970
|
+
}
|
|
3965
3971
|
var DEFAULT_LABELS = {
|
|
3966
3972
|
travellersHeading: "TRAVELLERS",
|
|
3967
3973
|
detailsHeading: "DETAILS",
|
|
@@ -4348,7 +4354,7 @@ function BookingAdventureCard({
|
|
|
4348
4354
|
lineHeight: "1.4",
|
|
4349
4355
|
margin: 0
|
|
4350
4356
|
},
|
|
4351
|
-
dangerouslySetInnerHTML: { __html: description }
|
|
4357
|
+
dangerouslySetInnerHTML: { __html: constrainItineraryImages(description) }
|
|
4352
4358
|
}
|
|
4353
4359
|
) : itinerary.map((line, i) => /* @__PURE__ */ jsx(
|
|
4354
4360
|
"p",
|