mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 06:20:21 +00:00
[server links] forward / backward slashes
This commit is contained in:
1 parent
4de8ffec1b
commit
3e23b72257
1 file changed
+4
-1
@@ -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, '<a href="$1">$1</a>')
|
||||
description = description = description.replace(/(smb:\/\/[^\s<>"()]+)/g, function(match) {
|
||||
return '<a href="' + match.replace(/\\/g, '/') + '">' + match.replace(/\\/g, '/') + '</a>'
|
||||
})
|
||||
} 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 '<span style="cursor: pointer; text-decoration: underline" onclick="' + getCopyFunction(match) + '">' + match + '</span>';
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user