fix for #570, sanitized tag names

This commit is contained in:
Tony Tam
2014-09-15 17:37:50 -07:00
parent b2096eb21b
commit 394afba3e5
3 changed files with 3 additions and 1 deletions

1
dist/swagger-ui.js vendored
View File

@@ -1495,6 +1495,7 @@ helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
MainView.prototype.addResource = function(resource) {
var resourceView;
resource.id = resource.id.replace(/\s/g, '_');
resourceView = new ResourceView({
model: resource,
tagName: 'li',

File diff suppressed because one or more lines are too long

View File

@@ -34,6 +34,7 @@ class MainView extends Backbone.View
addResource: (resource) ->
# Render a resource and add it to resources li
resource.id = resource.id.replace(/\s/g, '_')
resourceView = new ResourceView({model: resource, tagName: 'li', id: 'resource_' + resource.id, className: 'resource', swaggerOptions: @options.swaggerOptions})
$('#resources').append resourceView.render().el