Skip to content

bug: ft.Markdown cannot render the HTML img tags #6314

@zangxx66

Description

@zangxx66

Duplicate Check

Describe the bug

ft.Markdown cannot render HTML tags,it can only render strings in Markdown format.

Code sample

Code
sample = """
# hello world

<img src="https://raw.githubusercontent.com/flet-dev/flet/refs/heads/main/media/logo/flet-logo.svg" />
"""


def run_sample(page: ft.Page):
    page.add(
        ft.Markdown(
            value=sample,
            extension_set=ft.MarkdownExtensionSet.GITHUB_WEB,
        )
    )  

ft.run(run_sample)

To reproduce

  1. Run sample code.
  2. Show only the text content

Expected behavior

No response

Screenshots / Videos

Captures Image

Operating System

macOS

Operating system details

macOS 15.7.4

Flet version

0.82.2

Regression

I'm not sure / I don't know

Suggestions

No response

Logs

Logs
[Paste your logs here]

Additional details

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions