huginn: Unexpected `\` esacpe in json

Step to reproduce:

  • Enter agent edit page
  • Click on Toggle View, enter raw json edit mode
  • Edit some field so it contains \ 图片
  • Click on Toggle View (Enter visual edit mode), then Click on Toggle View again (enter raw json edit mode)

Expected: message is still a\nb Actual: message becomes a\\nb

图片


Or even worse:

  • Create a new agent, enter raw json edit mode, edit, carefully not to click on “Toggle View”
  • Save the agent
  • Edit the agent, do nothing, save the agent again

Expected: message is still a\nb Actual: message becomes a\\nb

123

About this issue

  • Original URL
  • State: open
  • Created 4 years ago
  • Comments: 17 (10 by maintainers)

Most upvoted comments

I see, to be honest I am surprised that "{{title}}\n{{content}}" works, as far as I know it should be invalid JSON. If you want to insert an actual line break character you can use the {% line_break %} Liquid tag.