Skip to content
This repository has been archived by the owner on Oct 20, 2022. It is now read-only.

how to avoid sanitize? #99

Open
cperezortiz opened this issue Apr 13, 2020 · 1 comment
Open

how to avoid sanitize? #99

cperezortiz opened this issue Apr 13, 2020 · 1 comment
Labels

Comments

@cperezortiz
Copy link

I got sanitize injected as a dependency into my project for custom reasons, but I'd like to avoid the sanitize in this line:
https://github.com/Orange-OpenSource/angular-swagger-ui/blob/master/src/scripts/modules/swagger-markdown.js#L54

because everytime it sanitizes here, it messes up my description field, specifically, my newlines \n, thus my html markdown, shows up not formatted as I expected it.

How to avoid the sanitize here?

@mathieuales
Copy link
Collaborator

mathieuales commented Jun 4, 2020

Hi!
Sorry for the late response... Is your swagger descriptor coming from a 'trusted source' ie. are you the owner of the swagger descriptor ?
If yes, you should add trusted-sources=true on swagger-ui directive
If no, then you should create your own module based on swagger-markdown.js and remove the piece of code causing the issue
Regards

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants