class Asciidoctor::AbstractNode

def normalize_system_path(target, start = nil, jail = nil, opts = {})

this path will be guaranteed to be contained within the jail.
parent references resolved and self references removed. If a jail is provided,
returns a String path resolved from the start and target paths, with any

outside the jail.
raises a SecurityError if a jail is specified and the resolved path is

* :target_name is used in messages to refer to the path being resolved
when an illegal path is encountered
* :recover is used to control whether the processor should auto-recover
opts - an optional Hash of options to control processing (default: {}):
jail - the String jail path to confine the resolved path
start - the String start (i.e., parent) path
target - the String target path

by default).
safe level is set to SafeMode::SAFE or greater (a condition which is true
file, stored in the base_dir instance variable on Document) if the document
path outside of the jail (which defaults to the directory of the source
The most important functionality in this method is to prevent resolving a

See PathResolver::system_path(target, start, jail, opts) for details.

using the PathResolver.
Public: Resolve and normalize a secure path from the target and start paths
def normalize_system_path(target, start = nil, jail = nil, opts = {})
  if start.nil?
    start = @document.base_dir
  end
  if jail.nil? && @document.safe >= SafeMode::SAFE
    jail = @document.base_dir
  end
  PathResolver.new.system_path(target, start, jail, opts)
end