Skip to content

[1.22.0] Image Upload becomes broken HTML tag in Chrome and Edge, but working Markdown in Firefox #31553

Closed
@FrostKiwi

Description

@FrostKiwi

Description

Regression after update from 1.21.5 to 1.22.0.
When uploading images via copy paste as a screenshot, the feature is now broken, depending on Browser, see Screenshots below.

On Firefox, when Pasting images, the behavior is the same as 1.21.5: Image gets pasted as Markdown and is visible. No broken links.

But on Microsoft Edge, the Links become HTML, not markdown and have broken links, as they they have the slash prefix, which are broken in a subpath context.
(Note: The file upload itself completes, you can fix this by changing it manually to Markdown)

Context: This is a Gitea instance on a subpath (domain.com/git)

[server]
SSH_DOMAIN = domain.net/git
DOMAIN = domain.net/git
HTTP_PORT = 3000
ROOT_URL = https://domain.net/git/

There have been multiple issues with subpaths around Gitea from time to time with broken file links appearing in different places, most recent: #31546

Gitea Version

1.22.0

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

Note: (Arc-green theme used, but it is actually 1.22.0)

Edge (and Chrome)

image
image

Firefox

image
image

Git Version

No response

Operating System

No response

How are you running Gitea?

Installed via Binary

Database

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue/needs-feedbackFor bugs, we need more details. For features, the feature must be described in more detail

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions