His remarks come amid continuing political exchanges over the tone of public discourse and the use of profanity on social media platforms.