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

[ and ] not allowed in callback. #51

Open
vitamink opened this issue Dec 14, 2017 · 0 comments
Open

[ and ] not allowed in callback. #51

vitamink opened this issue Dec 14, 2017 · 0 comments

Comments

@vitamink
Copy link

Is there any reason not to allow a callback to contain [ and ]?

I an JS plugin (CkEditor) which names callbacks like: CKEDITOR._.jsonpCallbacks[197] and this fails with the current build of WebApiContrib.Formatting.Jsonp.

This is easily resolved by changing CallbackValidator.cs as follows:
private static readonly Regex JsonpCallbackFormat = new Regex(@"[^0-9a-zA-Z\[\]\$_\.] (...many keywords follow...).

If this change is acceptable I can submit a pull request with modified code and a test.

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

1 participant