Skip to content

Pasting rich-text from gitlab breaks relative links #63

Description

@SaculRennorb

When copying a rendered readme from GitLab it contains links to issues as relative urls. These don't get modified when pasting into the moddb editors, so the relative links will point to bogous urls within the moddb, but crucially they stay as links so it looks like everything worked even though the result is unexpected.
This probably happens not too infrequently, and it should be fixable.

We can detect the format of the paste and add a small tinymce plugin to modify the links before they get pasted.

https://nathf.github.io/clipboard-inspector/ is a good tool for this, and it looks like the gitlab data uniquely contains a text/x-gfm-html section that is not present when copying from github.

If we cannot determine the source we should at least strip out relative urls so they don't point to dead urls.

This needs more testing before we can implement it, as we need to be certain we can uniquely identify the source page. (looks like github pastes contain absolute urls).

[tracking]
https://discord.com/channels/302152934249070593/810541931469078568/1360997967527542844

Activity

  1. added a commit that references this issue on Jun 27, 2025
  2. SaculRennorb commented on Jun 27, 2025

    @SaculRennorb
    ContributorAuthor

    This is actually a bit more difficult than i thought, because users might at least use /show/mod/... which looks like /user/repo/-/issues/.

    Ill revisit this in the future and probably just ping the pages to figure out if they exist. But not until ive got a better dialog system

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions