Copier un lien inclut le nombre de clics

Parfois, j’ai du texte contenant une URL sur laquelle des personnes ont cliqué, disons 9 fois.

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

Quelqu’un copie ce texte et le colle dans un autre message. Il ne remarque pas le 9 à la fin. Nous avons donc maintenant un lien qui semble valide, mais qui ne l’est pas.

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

Cela se produit parce que nous avons un groupe de personnes qui se relaient pour rédiger des annonces communautaires contenant toujours un lien vers un Google Doc en cours d’utilisation. La personne B copie l’annonce précédente de la personne A, et ensuite, oui, des liens brisés partout. Pourrait-on ajouter un espace avant le compteur de clics ?

11 « J'aime »

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 « J'aime »

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 « J'aime »

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 « J'aime »

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

4 « J'aime »

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 « J'aime »

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 « J'aime »

Confirmed looks good, results in:

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

Great idea @yanokwa

1 « J'aime »