fixed tag xss issue
This commit is contained in:
@@ -68,5 +68,13 @@ window.SwaggerUi.utils = {
|
||||
}
|
||||
|
||||
return result;
|
||||
},
|
||||
|
||||
sanitize: function(html) {
|
||||
// Strip the script tags from the html and inline evenhandlers
|
||||
html = html.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, '');
|
||||
html = html.replace(/(on\w+="[^"]*")*(on\w+='[^']*')*(on\w+=\w*\(\w*\))*/gi, '');
|
||||
|
||||
return html;
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user