Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invisible space characters are inserted via copy/paste #17

Open
jonesey95 opened this issue Feb 28, 2024 · 0 comments · May be fixed by #19
Open

Invisible space characters are inserted via copy/paste #17

jonesey95 opened this issue Feb 28, 2024 · 0 comments · May be fixed by #19

Comments

@jonesey95
Copy link

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.

NovemLinguae added a commit to NovemLinguae/shortdesc-helper that referenced this issue Apr 11, 2024
Must use RegEx so we can replace multiple in the same string

Tested in JS console but not tested in gadget

Fixes wikimedia-gadgets#17
@NovemLinguae NovemLinguae linked a pull request Apr 11, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant