Skip to content

Linebreaks not showing in embeds #4751

@JIBSIL

Description

@JIBSIL

Describe the bug

Hi,

I'm trying to embed a Huggingface space into my website. I'm not getting consistent behaviour between the embedded and standalone versions.

Linebreaks and code blocks (and it appears, all markdown) is broken in embeds.

Relevant parts of my HTML code:

<body class="bg-gray-200 flex items-center justify-center">
    <div class="container mx-auto bg-white rounded shadow-lg p-8">
...
        <gradio-app id="hf-onload" src="https://huggingfaceh4-starchat-playground.hf.space"></gradio-app>
...
    </div>
</body>

Yields this:
image

The same prompt (cached so it's the exact same) yields this on the full Huggingface/Gradio instance:
image

Have you searched existing issues? 🔎

  • I have searched and found no existing issues

Reproduction

<html>
    <head>
        <script type="module" src="https://gradio.s3-us-west-2.amazonaws.com/3.28.3/gradio.js"></script>
    </head>
    <body>
        <gradio-app id="hf-onload" src="https://huggingfaceh4-starchat-playground.hf.space"></gradio-app>
    </body>
</html>

Screenshot

n/a (provided in description)

Logs

n/a (happens clientside)

System Info

Client info:
Microsoft Edge
Version 114.0.1823.58 (Official build) (64-bit)

Extensions:
uBlock, Privacy Pass

I think it's an error with the clientside gradio lib so gradio version isn't important

Severity

Blocking usage of gradio

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomerssvelteFrontend-related issue (JS)

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions