turquoiseowl / i18n

Smart internationalization for ASP.NET
Other
556 stars 155 forks source link

Add check for async postbacks #189

Closed gitsno closed 9 years ago

gitsno commented 9 years ago

This is a fix for issue #188. The response filter creates a PostbackParser instance for all postbacks, but it should only create the PostbackParser instance for async Ajax postbacks, otherwise regular page postbacks are parsed unnecessarily and can even cause the entire page to cause an exception (this happens if the page has a pipe symbol anywhere in the content). This change adds a test so that the PostbackParser instance is only created for async Ajax postbacks.

Two further considerations:

  1. Making this even more robust and check that actual formatting of the postback.
  2. Rename PostbackParser because the parser does not parse all postbacks, rather only async Ajax postbacks.
turquoiseowl commented 9 years ago

Excellent, thank you.