Skip to content

Some files are recognized as SVG incorrectly, make the diff UI unable to work. #19733

Closed
@stuzer05

Description

@stuzer05

Description

When certain conditions are met gitea can't display the blade.php file diff when viewing the commit. It only works when I click "View source button". Second link is taken from network, it is causing the crash.

https://try.gitea.io/stuzer05/test-preview/commit/f97b3784f8c8efc222128f6dffd4e5abb5fda462
https://try.gitea.io/stuzer05/test-preview/raw/commit/e2f752e123151fea55959571d56d57462025f0f6/test.blade.php

image

Gitea Version

1.17.0

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

Docker

Database

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue/confirmedIssue has been reviewed and confirmed to be present or accepted to be implementedtype/bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions