Skip to content

Pasting rich-text from gitlab breaks relative links #63

@SaculRennorb

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

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