From 66e414d8591bf1c91c49d72799849275453ef8a7 Mon Sep 17 00:00:00 2001 From: mertmit Date: Sun, 10 Apr 2022 16:50:32 +0300 Subject: [PATCH] fix: URL parsing on UI Signed-off-by: mertmit --- .../spreadsheet/components/virtualCell/formulaCell.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/nc-gui/components/project/spreadsheet/components/virtualCell/formulaCell.vue b/packages/nc-gui/components/project/spreadsheet/components/virtualCell/formulaCell.vue index 0d27545f3f..b49dab2551 100644 --- a/packages/nc-gui/components/project/spreadsheet/components/virtualCell/formulaCell.vue +++ b/packages/nc-gui/components/project/spreadsheet/components/virtualCell/formulaCell.vue @@ -25,12 +25,13 @@ export default { const rawText = this.row[this.column.title].toString() let found = false - const out = rawText.match(/URI::\((.*?)\)/g, (_, url) => { + const out = rawText.replace(/URI::\((.*?)\)/g, (_, url) => { found = true const a = document.createElement('a') a.textContent = url a.setAttribute('href', url) - return a.innerHTML + a.setAttribute('target', '_blank') + return a.outerHTML }) return found && out