Updated extra fields rendering to trim the output to avoid issues by whitespace.