Page MenuHomePhabricator

Invisible space characters are being added to short descriptions, apparently via copy/paste
Closed, InvalidPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • It is unknown what browser was being used, but it looks like copy/paste from the article, displayed in the desktop version, was involved.
  • Enable the short description helper gadget on en.WP.
  • Visit an article.
  • In the article, copy a string of text that includes a link.
  • Click Edit on the short description helper gadget and paste the string of text. Save the new short description.

What happens?:

  • This may not happen in all web browsers.
  • Observe by inspecting the characters that an invisible non-breaking space is inserted into the short description template, in violation of common sense, need, and en.WP's Manual of Style. Sample diff here, with fix shown here.
  • Note that there were no non-breaking spaces present in the wikitext of the article that was copied.

What should have happened instead?:
Invisible space characters should not be copied from the article's rendered prose when they are not present in the wikitext of the article. They should not be saved in the short description gadget's editing area. (They are sometimes needed in scripts, however, so they should not be forbidden everywhere.)

Software version (skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):

Event Timeline

This should probably be posted on https://en.wikipedia.org/wiki/Wikipedia_talk:Shortdesc_helper instead - problems with on-wiki gadgets are generally not tracked on Phabricator.

I posted it a month ago with no response. It is unclear to me who maintains this gadget. I do not see a link to an official bug-reporting venue at the gadget's page, but I may have missed it.

Reported at https://github.com/wikimedia-gadgets/shortdesc-helper/issues/17 just to cover my bases. I am not a programmer, so submitting a pull request with modified code is probably beyond my skills.