angular-swagger-ui icon indicating copy to clipboard operation
angular-swagger-ui copied to clipboard

how to avoid sanitize?

Open cperezortiz opened this issue 4 years ago • 1 comments

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?

cperezortiz avatar Apr 13 '20 23:04 cperezortiz

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

mathieuales avatar Jun 04 '20 08:06 mathieuales