Fixed show page titles double-escaping HTML entities

Fixes #187
This commit is contained in:
Donkie
2023-12-17 20:46:03 +01:00
parent b0fbe7dea7
commit f5b2ffa029
3 changed files with 11 additions and 3 deletions

View File

@@ -27,7 +27,11 @@ export const FilamentShow: React.FC<IResourceComponentsProps> = () => {
if (item.vendor) {
vendorPrefix = `${item.vendor.name} - `;
}
return t("filament.titles.show_title", { id: item.id, name: vendorPrefix + item.name });
return t("filament.titles.show_title", {
id: item.id,
name: vendorPrefix + item.name,
interpolation: { escapeValue: false },
});
};
const gotoVendor = (): undefined => {

View File

@@ -45,7 +45,11 @@ export const SpoolShow: React.FC<IResourceComponentsProps> = () => {
};
const formatTitle = (item: ISpool) => {
return t("spool.titles.show_title", { id: item.id, name: formatFilament(item.filament) });
return t("spool.titles.show_title", {
id: item.id,
name: formatFilament(item.filament),
interpolation: { escapeValue: false },
});
};
return (

View File

@@ -22,7 +22,7 @@ export const VendorShow: React.FC<IResourceComponentsProps> = () => {
const record = data?.data;
const formatTitle = (item: IVendor) => {
return t("vendor.titles.show_title", { id: item.id, name: item.name });
return t("vendor.titles.show_title", { id: item.id, name: item.name, interpolation: { escapeValue: false } });
};
return (