Swagger removing html attributes from description
See original GitHub issueSwagger version:3.0.14
The new Swagger version is removing the html attributes from the description. Original in the index.json file:
"info": {
"title": "Documentation",
"description": "<table><tr><td colspan=\"3\"><span class=\"method\">PUT</span></td></tr></table>",
"contact": ""
},
Cleared version:
"info": {
"title": "Documentation",
"description": "<table><tr><td><span>PUT</span></td></tr></table>",
"contact": ""
},
Issue Analytics
- State:
- Created 6 years ago
- Comments:12 (7 by maintainers)
Top Results From Across the Web
Swagger UI's removes inline style, class in asp net core xml
Swagger UI's removes inline style, class in asp net core xml ... UI's HTML sanitizer removes inline style, class, and data-* attributes.
Read more >Swagger UI configuration
When enabled, sanitizer will leave style , class and data-* attributes untouched on all HTML Elements declared inside markdown strings. This parameter is ......
Read more >Describing Parameters
In Swagger, API operation parameters are defined under the parameters section in the operation definition. Each parameter has name , value type (for ......
Read more >Swagger RESTful API Documentation Specification
Swagger ™ is a project used to describe and document RESTful APIs. The Swagger specification defines a set of files required to describe...
Read more >OpenAPI Specification - Version 3.0.3
If a parameter is already defined at the Path Item, the new definition will override it but can never remove it. The list...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

This specific use case is fixed in #4194 🎉
This could be a starting point: https://www.npmjs.com/package/sanitize-html#wildcards-for-attributes
The code seems to be here: components/providers/markdown.jsx
A relevant commit: https://github.com/swagger-api/swagger-ui/commit/60e8091eedde05244a1d8c498b5f85f7390ed9af