diff options
| author | Michael Williamson <mike@zwobble.org> | 2025-09-10 16:15:28 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2025-09-10 16:15:28 +0100 |
| commit | 150bf98e7ae2fd8ae874c3e756c39f01b3c01a23 (patch) | |
| tree | 22844fd319ceba4c54d4e95ddb6246fd2e9b17d2 /README.md | |
| parent | 603f8b83c0389be91ca90a3cb7690d7f237699d8 (diff) | |
Support disabling external file access
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -178,6 +178,16 @@ pass `include_default_style_map=False`: result = mammoth.convert_to_html(docx_file, style_map=style_map, include_default_style_map=False) ``` +#### External file access + +Source documents may reference files outside of the source document. +To disable access to any such external files during the conversion process, +pass `external_file_access=False`: + +```javascript +result = mammoth.convert_to_html(docx_file, external_file_access=False) +``` + #### Custom image handlers By default, images are converted to `<img>` elements with the source included inline in the `src` attribute. @@ -415,6 +425,9 @@ For instance: and embed the HTML into your website, this may allow arbitrary files on the server to be read and exfiltrated. + To disable access to any such external files during the conversion process, + pass `external_file_access=False`. + ### Document transforms **The API for document transforms should be considered unstable, |
