Giter VIP home page Giter VIP logo

Comments (4)

hunyadi avatar hunyadi commented on August 14, 2024

This is an intentional (security) feature to prevent inadvertently injecting potentially harmful or sensitive content into a document. md2conf defines a base path, and all relative paths must resolve to a path that is identical to or a descendant of the base path. For example, assuming the base path is /root/base/, documents can reference sub1/doc1.md (resolves to resource in child folder /root/base/sub1/doc1.md) or doc2.md (resolves to sibling entry /root/base/doc2.md) but not ../sub3/doc3.md, which would resolve to /root/sub3/doc3.md, which is no longer inside /root/base/.

Currently, the base path is tied to the document. However, I could imagine a feature improvement in which you can configure base path, and relax where references can point to.

from md2conf.

joesustaric avatar joesustaric commented on August 14, 2024

Ok I see. Understood.

In my use case it would be great if there could be a non default switch to bypass this to just allow relative links from the anywhere in the base dir.

from md2conf.

hunyadi avatar hunyadi commented on August 14, 2024

A new command line configuration option --ignore-invalid-url has been added to prevent exceptions when invalid links are encountered. You will still need to export a full document tree to ensure that cross-referencing relative links are resolved (e.g. you need to export document A to ensure that links found in document B that point to document A are resolved).

from md2conf.

joesustaric avatar joesustaric commented on August 14, 2024

Thanks very much!

from md2conf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.