diff --git a/app/src/plugins/tm@_utils/server-links.utils.ts b/app/src/plugins/tm@_utils/server-links.utils.ts index f52b3ff..aca5125 100644 --- a/app/src/plugins/tm@_utils/server-links.utils.ts +++ b/app/src/plugins/tm@_utils/server-links.utils.ts @@ -31,13 +31,16 @@ export function prepareHTMLDescription(description) { description = description.replace(/\\\\/g, 'smb://') // find all smb links and replace them with clickable links, separated by ' ', '<', '>', '"', and '(', ')' characters - description = description.replace(/(smb:\/\/[^\s<>"()]+)/g, '$1') + description = description = description.replace(/(smb:\/\/[^\s<>"()]+)/g, function(match) { + return '' + match.replace(/\\/g, '/') + '' + }) } else { description = description.replace(/smb:\/\//g, '\\\\') // find all windows links and replace them with clickable links, separated by ' ', '<', '>', '"', and '(', ')' characters description = description.replace(/(\\\\[^\s<>"()]+)/g, function(match) { + match = match.replaceAll('/', '\\') return '' + match + ''; }); }