Skip to content

Idea: Humanize Links #1

@SomeOtherGod

Description

@SomeOtherGod

ChatGPT often adds an utm_source to links.
For example "https://de.wikipedia.org/wiki/BorgWarner?utm_source=chatgpt.com".
It would be great if humanize-ai-lib could also remove this.

Something like this could work:

url.replace(/(\?|&)utm_source=[^&]*&?/, (match, p1) => (p1 === '?' ? '?' : ''))
   .replace(/[?&]$/, '');

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