From 474d5ed2917007917d83cabe35d0b44adb3e232e Mon Sep 17 00:00:00 2001 From: Peter Velkov Date: Fri, 24 Mar 2023 20:58:34 +0200 Subject: [PATCH] Fix AnchorRenderer download link for attachments Attachments should be downloaded from a path relative to the current API root See: https://github.com/Expensify/App/issues/16327#issuecomment-1477596282 --- .../HTMLEngineProvider/HTMLRenderers/AnchorRenderer.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/HTMLEngineProvider/HTMLRenderers/AnchorRenderer.js b/src/components/HTMLEngineProvider/HTMLRenderers/AnchorRenderer.js index 8c27cba1f7a8..be8c8a1fc3eb 100644 --- a/src/components/HTMLEngineProvider/HTMLRenderers/AnchorRenderer.js +++ b/src/components/HTMLEngineProvider/HTMLRenderers/AnchorRenderer.js @@ -16,6 +16,7 @@ import AnchorForCommentsOnly from '../../AnchorForCommentsOnly'; import AnchorForAttachmentsOnly from '../../AnchorForAttachmentsOnly'; import * as Url from '../../../libs/Url'; import ROUTES from '../../../ROUTES'; +import tryResolveUrlFromApiRoot from '../../../libs/tryResolveUrlFromApiRoot'; const AnchorRenderer = (props) => { const htmlAttribs = props.tnode.attributes; @@ -77,7 +78,7 @@ const AnchorRenderer = (props) => { if (isAttachment) { return ( );