Set the Safe Mode Using the API
The default safe mode in the API is SECURE
.
You can change the safe mode using a string, symbol or integer value.
Set :safe option
The value must be set in the document constructor using the :safe
option.
result = Asciidoctor.convert_file('master.adoc', safe: 'server')
or
result = Asciidoctor.convert_file('master.adoc', safe: :server)
or
result = Asciidoctor.convert_file('master.adoc', safe: 10)
You can also set the safe mode from the CLI and enable or disable content based on the current safe mode.