[1.20] Profile readme seems to be trimmed before rendering #11008

Closed
opened 2025-11-02 09:24:48 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @b1ek on GitHub (Jun 10, 2023).

Description

I wanted to try out the profile readme thing, but it isn't rendered as its supposed to be. I can't upload an image, but you can see it on my gitea instance and how its supposed to be

I looked over the code, and the thing seems to be locateed here. My guess is that the markdown.RenderString method uses 2nd argument to limit the HTML output length, but since the size of original file is passed, it causes unwanted trimming of content.

Gitea Version

 1.20.0+rc0-9-gde1d14590 built with GNU Make 4.4.1, go1.20.5 : bindata, timetzdata, sqlite, sqlite_unlock_notify

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

not relevant / useful

Screenshots

No response

Git Version

2.40.1, Wire Protocol Version 2 Enabled Repository Root Path

Operating System

Using one of the nightly 1.20 docker images

How are you running Gitea?

I am using this docker image

Database

PostgreSQL

Originally created by @b1ek on GitHub (Jun 10, 2023). ### Description I wanted to try out the profile readme thing, but it isn't rendered as its supposed to be. I can't upload an image, but you can see it on my [gitea instance](https://git.blek.codes/blek) and [how its supposed to be](https://git.blek.codes/blek/.profile/src/branch/master/README.md) I looked over the code, and the thing seems to be locateed [here](https://github.com/go-gitea/gitea/blob/eb2ba43fa16d79d65c6eb6216472e149af92fed8/routers/web/user/profile.go#L118). My guess is that the `markdown.RenderString` method uses 2nd argument to limit the HTML output length, but since [the size of original file](https://github.com/go-gitea/gitea/blob/eb2ba43fa16d79d65c6eb6216472e149af92fed8/routers/web/user/profile.go#LL108C16-L108C36) is passed, it causes unwanted trimming of content. ### Gitea Version 1.20.0+rc0-9-gde1d14590 built with GNU Make 4.4.1, go1.20.5 : bindata, timetzdata, sqlite, sqlite_unlock_notify ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist not relevant / useful ### Screenshots _No response_ ### Git Version 2.40.1, Wire Protocol Version 2 Enabled Repository Root Path ### Operating System Using one of the nightly 1.20 docker images ### How are you running Gitea? I am using [this docker image](https://hub.docker.com/layers/gitea/gitea/1.20-nightly/images/sha256-03cb37f2a6963f18668db174df63bdcecd0ee6632e24248289d981866ae1f787?context=explore) ### Database PostgreSQL
GiteaMirror added the type/bug label 2025-11-02 09:24:48 -06:00
Author
Owner

@silverwind commented on GitHub (Jun 10, 2023):

Duplicate of https://github.com/go-gitea/gitea/issues/25094. Will be fixed on https://github.com/go-gitea/gitea/pull/25131.

@silverwind commented on GitHub (Jun 10, 2023): Duplicate of https://github.com/go-gitea/gitea/issues/25094. Will be fixed on https://github.com/go-gitea/gitea/pull/25131.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#11008