diff options
Diffstat (limited to 'packages/taler-wallet-webextension/src')
3 files changed, 4 insertions, 5 deletions
diff --git a/packages/taler-wallet-webextension/src/components/TermsOfService/state.ts b/packages/taler-wallet-webextension/src/components/TermsOfService/state.ts index ac7896fbe..0b27c9dcf 100644 --- a/packages/taler-wallet-webextension/src/components/TermsOfService/state.ts +++ b/packages/taler-wallet-webextension/src/components/TermsOfService/state.ts @@ -39,7 +39,7 @@ export function useComponentState({ showEvenIfaccepted, exchangeUrl, readOnly, c WalletApiOperation.GetExchangeTos, { exchangeBaseUrl: exchangeUrl, - acceptedFormat: ["text/xml"], + acceptedFormat: ["text/html"], acceptLanguage: acceptedLang, }, ); diff --git a/packages/taler-wallet-webextension/src/components/TermsOfService/utils.ts b/packages/taler-wallet-webextension/src/components/TermsOfService/utils.ts index fdca78ee5..96e268689 100644 --- a/packages/taler-wallet-webextension/src/components/TermsOfService/utils.ts +++ b/packages/taler-wallet-webextension/src/components/TermsOfService/utils.ts @@ -46,8 +46,7 @@ function parseTermsOfServiceContent( } } else if (type === "text/html") { try { - const href = new URL(text); - return { type: "html", href }; + return { type: "html", html: text }; } catch (e) { logger.error("error parsing url", e); } @@ -90,7 +89,7 @@ export interface TermsDocumentXml { export interface TermsDocumentHtml { type: "html"; - href: URL; + html: string; } export interface TermsDocumentPlain { diff --git a/packages/taler-wallet-webextension/src/components/TermsOfService/views.tsx b/packages/taler-wallet-webextension/src/components/TermsOfService/views.tsx index 3e2dfb630..79e49427e 100644 --- a/packages/taler-wallet-webextension/src/components/TermsOfService/views.tsx +++ b/packages/taler-wallet-webextension/src/components/TermsOfService/views.tsx @@ -176,7 +176,7 @@ export function ShowTosContentView({ </div> ))} {terms.content.type === "html" && ( - <iframe src={terms.content.href.toString()} /> + <iframe style={{width: "100%"}} srcDoc={terms.content.html} /> )} {terms.content.type === "pdf" && ( <a href={terms.content.location.toString()} download="tos.pdf"> |