Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove title from elements on Org mode #27968

Merged
merged 2 commits into from
Nov 10, 2023
Merged

Conversation

KN4CK3R
Copy link
Member

@KN4CK3R KN4CK3R commented Nov 8, 2023

The Org mode rendering has some problems:

  1. [[https://example.com][pre https://example.com/example.mp4 post]]
    renders as
    <p><a href="https://example.com" title="pre <video src="https://example.com/example.mp4" title="https://example.com/example.mp4">https://example.com/example.mp4</video> post">pre <video src="https://example.com/example.mp4" title="https://example.com/example.mp4">https://example.com/example.mp4</video> post</a></p>
    As you can see, the title attribute contains the inner html in unescaped form. I removed the title attribute because it is of little value.
  2. The title attribute on img and video is of little value.
  3. The inner elements of video are different depending on the if.

@pull-request-size pull-request-size bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Nov 8, 2023
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Nov 8, 2023
@lunny
Copy link
Member

lunny commented Nov 9, 2023

Maybe we can escape it?

@KN4CK3R
Copy link
Member Author

KN4CK3R commented Nov 9, 2023

Tried that but I see no value:
grafik

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Nov 9, 2023
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Nov 10, 2023
@lunny lunny added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Nov 10, 2023
@lunny lunny added this to the 1.22.0 milestone Nov 10, 2023
@lunny lunny enabled auto-merge (squash) November 10, 2023 01:08
@lunny lunny merged commit 481e738 into go-gitea:main Nov 10, 2023
25 checks passed
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Nov 10, 2023
zjjhot added a commit to zjjhot/gitea that referenced this pull request Nov 10, 2023
* giteaofficial/main:
  Remove `title` from elements on Org mode (go-gitea#27968)
  Add Profile Readme for Organisations (go-gitea#27955)
  Allow to set explore page default sort (go-gitea#27951)
@KN4CK3R KN4CK3R deleted the fix-org-title branch November 11, 2023 21:40
fuxiaohei pushed a commit to fuxiaohei/gitea that referenced this pull request Jan 17, 2024
The Org mode rendering has some problems:
1.  `[[https://example.com][pre https://example.com/example.mp4 post]]`
 renders as
`<p><a href="https://example.com" title="pre <video
src="https://example.com/example.mp4"
title="https://example.com/example.mp4">https://example.com/example.mp4</video>
post">pre <video src="https://example.com/example.mp4"
title="https://example.com/example.mp4">https://example.com/example.mp4</video>
post</a></p>`
As you can see, the `title` attribute contains the inner html in
unescaped form. I removed the `title` attribute because it is of little
value.
3. The `title` attribute on `img` and `video` is of little value.
4. The inner elements of `video` are different depending on the `if`.
wxiaoguang added a commit to wxiaoguang/gitea that referenced this pull request Feb 7, 2024
@wxiaoguang wxiaoguang added backport/done All backports for this PR have been created backport/manual No power to the bots! Create your backport yourself! backport/v1.21 This PR should be backported to Gitea 1.21 labels Feb 7, 2024
silverwind pushed a commit that referenced this pull request Feb 7, 2024
Backport #29024
Also backport #27968 (remove unnecessary titles)

Fix #28974

Add some new tests and fix some legacy unclear tests.
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Feb 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/done All backports for this PR have been created backport/manual No power to the bots! Create your backport yourself! backport/v1.21 This PR should be backported to Gitea 1.21 lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants