encode content properly before turn