Skip to content

TagSpaces is an offline, open source, document manager with tagging support

fixing issue in windows

uggrockd665dac28578
diff --git a/data/ext/viewerMD/main.js b/data/ext/viewerMD/main.js
index 4051c6646..41d914e98 100644
--- a/data/ext/viewerMD/main.js
+++ b/data/ext/viewerMD/main.js
@@ -122,7 +122,7 @@ function setContent(content, fileDirectory) {
currentSrc.indexOf("data:") === 0) {
// do nothing if src begins with http(s):// or data:
} else {
- var path = "file://" + fileDirectory + (isWin ? "\\" : "/") + currentSrc;
+ var path = "file://" + fileDirectory + "/" + currentSrc;
$(this).attr("src", path);
}
});
@@ -135,12 +135,12 @@ function setContent(content, fileDirectory) {
currentSrc.indexOf("data:") === 0) {
// do nothing if src begins with http(s):// or data:
} else {
- var path = "file://" + fileDirectory + (isWin ? "\\" : "/") + currentSrc;
+ var path = "file://" + fileDirectory + "/" + currentSrc;
$(this).attr("href", path);
}
});
- $("#htmlContent").find("a").bind('click', function(e) {
+ $htmlContent.find("a").bind('click', function(e) {
e.preventDefault();
var msg = { command: "openLinkExternally", link : $(this).attr("href") };
window.parent.postMessage(JSON.stringify(msg), "*");