Fix encoding error in editor call method parameters to allow for proper JSON parsing.

Fixes #2597.