Skip to content

[ and ] not allowed in callback. #51

@vitamink

Description

@vitamink

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions