remove escaped backslashes from meta

This commit is contained in:
Pas 2025-12-29 14:14:50 -07:00
parent b13d5fbdb1
commit f09e71c16d

View file

@ -9,7 +9,14 @@ export interface MetaResponse {
}
export async function getBackendMeta(url: string): Promise<MetaResponse> {
return ofetch<MetaResponse>("/meta", {
const meta = await ofetch<MetaResponse>("/meta", {
baseURL: url,
});
// Remove escaped backslashes before apostrophes (e.g., \' becomes ')
return {
...meta,
name: meta.name.replace(/\\'/g, "'"),
description: meta.description?.replace(/\\'/g, "'"),
};
}