wikimedia-gadgets / shortdesc-helper

Gadget on the English Wikipedia.
8 stars 4 forks source link

Invisible space characters are inserted via copy/paste #17

Open jonesey95 opened 6 months ago

jonesey95 commented 6 months ago

I reported this in detail at https://phabricator.wikimedia.org/T358717 and at https://en.wikipedia.org/wiki/Wikipedia_talk:Shortdesc_helper#Shortdesc_helper_allowing_insertion_of_invalid_invisible_space_characters

Invisible space characters are being inserted via copy/paste. I think a similar pattern to the DATEREPLACEMENT code could silently replace invisible space characters with regular space characters.

The DATEREPLACEMENT code could also be enhanced to replace em dashes with en dashes; I have fixed hundreds of errant em dashes in date ranges and other parts of short descriptions.