diff options
Diffstat (limited to 'src/main/java/org/zwobble/mammoth/DocumentConverter.java')
| -rw-r--r-- | src/main/java/org/zwobble/mammoth/DocumentConverter.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main/java/org/zwobble/mammoth/DocumentConverter.java b/src/main/java/org/zwobble/mammoth/DocumentConverter.java index 2dea8e8..c7dca20 100644 --- a/src/main/java/org/zwobble/mammoth/DocumentConverter.java +++ b/src/main/java/org/zwobble/mammoth/DocumentConverter.java @@ -61,6 +61,15 @@ public class DocumentConverter { } /** + * Source documents may reference files outside of the source document. + * Call this to disable access to any such external files during the conversion process. + * This is highly recommended when converting untrusted user input. + */ + public DocumentConverter disableExternalFileAccess() { + return new DocumentConverter(options.disableExternalFileAccess()); + } + + /** * By default, images are converted to {@code <img>} elements with the source included inline in the {@code src} attribute. * Call this to change how images are converted. */ |
