Fix escaping resource name.

This commit is contained in:
Sreenidhi Sreesha
2016-12-08 11:55:40 -08:00
parent 2ba1c100ae
commit 878dad251d
+1 -1
View File
@@ -111,7 +111,7 @@ SwaggerUi.Views.MainView = Backbone.View.extend({
addResource: function(resource, auths){
// Render a resource and add it to resources li
resource.id = resource.id.replace(/\s/g, '_');
resource.id = resource.id.replace(/[[\]{}()*+?,\\/^$|#\s]/g, '_');
// Make all definitions available at the root of the resource so that they can
// be loaded by the JSonEditor