Skip to content

adk web: asterisks in user messages rendered as Markdown italic instead of literal text #4846

@Subhamkp

Description

@Subhamkp

🔴 Required Information

Please ensure all items in this section are completed to allow for efficient
triaging. Requests without complete information may be rejected / deprioritized.
If an item is not applicable to you - please mark it as N/A

Describe the Bug:
The adk web chat UI interprets asterisk (*) characters in user messages as Markdown italic formatting instead of displaying them as literal text. Math expressions like 2*3*4*5 are rendered as 234*5 in the chat bubble.

Steps to Reproduce:

  1. Create any ADK agent
  2. Run adk web
  3. Open http://localhost:8000 and select the agent
  4. Type 2*3*4*5 in the chat input and send
  5. Observe the user message bubble renders as 234*5

Expected Behavior:
The user message bubble should display the literal text 2*3*4*5 exactly as typed.

Observed Behavior:
The asterisks are consumed as Markdown italic markers. 2*3*4*5 becomes 2 + 3 (italic) + 4 + 5 → displays as 234*5. The agent receives the correct input (verified in the event panel on the left side), so this is purely a frontend rendering issue.

Environment Details:

  • ADK Library Version (pip show google-adk): 1.27.1
  • Desktop OS:** macOS
  • Python Version (python -V): 3.12

Model Information:

  • Are you using LiteLLM: No
  • Which model is being used: gemini-2.5-flash

🟡 Optional Information

Providing this information greatly speeds up the resolution process.

Regression:
N/A (first time using adk web)

Logs:
N/A — no errors in logs, this is a frontend rendering issue only.

Screenshots / Video:
If applicable, add screenshots or screen recordings to help explain
your problem.
Image

Additional Context:
Add any other context about the problem here.

Minimal Reproduction Code:
Please provide a code snippet or a link to a Gist/repo that isolates the issue.

# Any agent will reproduce this. Minimal example:
from google.adk.agents import LlmAgent

root_agent = LlmAgent(
    model="gemini-2.5-flash",
    name="test_agent",
    instruction="You are a helpful assistant.",
)
# Run: adk web
# Type: 2*3*4*5

How often has this issue occurred?:

  • Always (100%)

Metadata

Metadata

Assignees

Labels

web[Component] This issue will be transferred to adk-web

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions