Das Kopieren eines Links enthält die Klickanzahl

Manchmal habe ich Text mit einer URL, auf die Nutzer geklickt haben, sagen wir 9 Mal.

Lorem ipsum dolor sit amet https://example.com/NQoiffrCbcaZHcKQe5syENZiKWsvEc onsetetur sadipscing elitr.

Jemand kopiert diesen Text und fügt ihn in einen anderen Beitrag ein. Dabei bemerkt er die 9 am Ende nicht. So entsteht nun ein Link, der gültig aussieht, aber nicht ist.

Lorem ipsum dolor sit amet https://example.com/NQoiffrCbcaZHcKQe5syENZiKWsvEc9 onsetetur sadipscing elitr.

Das passiert, weil wir eine Gruppe von Leuten haben, die sich abwechselnd mit dem Verfassen von Community-Ankündigungen befassen, die immer einen Link zu einem laufenden Google-Dokument enthalten. Person B kopiert die vorherige Ankündigung von Person A und schon gibt es überall kaputte Links. Könnte vor der Klickzahl ein Leerzeichen eingefügt werden?

11 „Gefällt mir“

I believe that’d be a markup issue @awesomerobot I do like the suggestion if we can do it easily, have seen this before.

3 „Gefällt mir“

It’s possible we could have a space here inserted, but even copying the number is superfluous imo, it should be in <span class='ignore-copy'> or something like that and we should get it into the clipboard without the number.

Also @yanokwa do you have enable rich text paste enabled, does this resolve your issue?

@vinothkannans we got to spend some time improving internal usage of enable rich text paste, it is a bit flakey.

3 „Gefällt mir“

There’s a way to do prevent copying using psuedo elements, but it’s not great for accessibility (“CSS generated content is not content”)

Adding a space is a small improvement that shouldn’t impact anything else though.

8 „Gefällt mir“

This is always :musical_note: to my :ear:s

4 „Gefällt mir“

I do not rich text paste enabled and when I tried, it did not resolve the issue.

PR to add a space before the counter here:

11 „Gefällt mir“

Space is added, so now you can copy & paste without breaking the link… like so:

https://example.com/NQoiffrCbcaZHcKQe5syENZiKWsvEc 2

Still room for future improvement, like not allowing click counts into the clipboard at all.

7 „Gefällt mir“

Confirmed looks good, results in:

dolor sit amet https://example.com/NQoiffrCbcaZHcKQe5syENZiKWsvEc 2 onsetetur

Great idea @yanokwa

1 „Gefällt mir“