web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / HTML tags showing in u...
Copilot Studio
Suggested Answer

HTML tags showing in user input ( issue in Teams chat)

(0) ShareShare
ReportReport
Posted on by

Hi everyone,

I’m facing an issue in Copilot Studio (Teams channel) and need some guidance.

When a user sends a message sometimes is shows <div> tag:
Thanks

the bot displays it exactly as (from users end):
<div>Thanks</div>
instead of rendering or converting it to plain text (Thanks).

So essentially, HTML tags from user input are not being sanitized or stripped, and they appear directly in the chat.

 

Setup:

  • Topic is triggered using “A message is received”
  • Response is sent using a Message node
  • We are not using Adaptive Cards and need to continue with Message node only

What I’ve checked so far:

  • This is user input, not something generated from the bot response
  • The issue occurs in the Teams channel
  • I’m not explicitly adding any HTML formatting in my topic or flow
I have the same question (0)
  • Suggested answer
    Sunil Kumar Pashikanti Profile Picture
    2,039 Moderator on at
     
    This happens because Teams sends some user messages as HTML, and Copilot Studio does not sanitize or render HTML in Message nodes. The raw tags (like <div>) are passed through as plain text. This is expected behavior in the Teams channel. If you need clean text, you’ll need to strip HTML tags yourself before sending the response.

    One option you may try: Strip HTML yourself
    Use a small cleanup step before sending the response.
    If you’re using a flow / tool call:
    Remove tags using a regex or replace logic
    Conceptually:
    remove <...> tags > keep inner text
    Even a simple replace for common tags (<div>, </div>) often solves 90% of cases.
     
    ✅ If this answer helped resolve your issue, please mark it as Accepted so it can help others with the same problem.
    👍 Feel free to Like the post if you found it useful.

    Sunil Kumar Pashikanti, Moderator
    Blog:
     https://sunilpashikanti.com/posts/

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Copilot Studio

#1
Valantis Profile Picture

Valantis 704

#2
Vish WR Profile Picture

Vish WR 249

#3
Haque Profile Picture

Haque 244

Last 30 days Overall leaderboard