preserveRelativeLinks(_:)

Configure this Whitelist to preserve relative links in an element’s URL attribute, or convert them to absolute links. By default, this is false: URLs will be made absolute (e.g. start with an allowed protocol, like e.g. {@code http://}.

Whitelist.swift:403
@discardableResult func preserveRelativeLinks(_ preserve: Bool) -> Whitelist

Note that when handling relative links, the input document must have an appropriate {@code base URI} set when parsing, so that the link's protocol can be confirmed. Regardless of the setting of the {@code preserve relative links} option, the link must be resolvable against the base URI to an allowed protocol; otherwise the attribute will be removed.

<param>
<return>
<see>