angular-swagger-ui
angular-swagger-ui copied to clipboard
how to avoid sanitize?
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?
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