Skip to content

Instantly share code, notes, and snippets.

View Allon-Guralnek's full-sized avatar

Allon Guralnek Allon-Guralnek

  • ANZ Bank
  • Melbourne, Australia
  • 06:15 (UTC +10:00)
View GitHub Profile
@Daniel15
Daniel15 / gist:3074365
Created July 9, 2012 05:26
Validating JSONP callback function name in C#
/// <summary>
/// Validation of JSONP callback function names
/// </summary>
/// <remarks>
/// Based off the PHP code at https://gist.github.com/1217080, which is originally based off
/// a blog post at http://tav.espians.com/sanitising-jsonp-callback-identifiers-for-security.html
/// </remarks>
public class JsonValidator
{
/// <summary>