Skip to content
This repository has been archived by the owner on Apr 4, 2019. It is now read-only.

Relative link issue after opening a local file #73

Open
Macobian opened this issue Jun 6, 2016 · 3 comments
Open

Relative link issue after opening a local file #73

Macobian opened this issue Jun 6, 2016 · 3 comments
Labels

Comments

@Macobian
Copy link

Macobian commented Jun 6, 2016

There are two markdown files on my local computer(Windows7):

  • C:\dir1\test1.md
  • C:\dir1\dir2\test2.md

I want a relative link in test1.md to test2.md after opening test1.md, like this:

 [TEST2](dir2/test2.md)

And I also want another link in test2.md back to test1.md after following the link above, like this:

 [TEST1](../test1.md)

Those links do not seem to be working in the current version.

I noticed these links below were OK, but they are incompatible with server file format.

 [TEST2](dir2\test2.md)
 [TEST1](test1.md)
@Thiht Thiht added the bug label Jun 8, 2016
@lunat
Copy link

lunat commented Jul 5, 2016

I had the same problem.

I found that the solution can be to remove the code to "sanitize" links here:
https://github.com/Thiht/markdown-viewer/blob/master/chrome/content/markdown-viewer.js
at line 149, 150, 151

// Sanitize: Only allow links in the same folder.
var match = linkInTheSameFolderWithHash.exec(originalHref);
if (match) {

This should be removed or it could be put under condition that the user can set in the PlugIn Option

@tinyplasticgreyknight
Copy link

This sounds like the problem I'm seeing too.

@funkvn
Copy link

funkvn commented Sep 23, 2017

I have the same problem.
Is this Add On maintained anymore?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants