Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

meta-characters in resources #45

Closed
pjlammertyn opened this issue Aug 8, 2012 · 1 comment
Closed

meta-characters in resources #45

pjlammertyn opened this issue Aug 8, 2012 · 1 comment

Comments

@pjlammertyn
Copy link

there schould be a replace of meta-characters in all swagger-ui functions

If you wish to use any of the meta-characters ( such as !"#$%&'()*+,./:;<=>?@[]^`{|}~ ) as a literal part of a name, you must escape the character with two backslashes: .

ex:

toggleEndpointListForResource: function(resource) {
    var elem = $('li#resource_' + resource.replace(/[!"#$%&'()*+,.\/:;<=>?@\[\\\]\^`{|}~]/g,"\\$&") + ' ul.endpoints');
    if (elem.is(':visible')) {
        Docs.collapseEndpointListForResource(resource);
    } else {
        Docs.expandEndpointListForResource(resource);
    }
},
@ghost ghost assigned ayush Aug 13, 2012
@ayush ayush closed this as completed in 58d5a35 Aug 28, 2012
@ayush
Copy link
Contributor

ayush commented Aug 28, 2012

@pjlammertyn thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants