Skip to content

[BUG] Multiple spaces in GM_registerMenuCommand caption get reduced to a single space #2267

@zamora

Description

@zamora

Sequence of actions:

  1. Install the following userscript:
// ==UserScript==
// @name        Multiple Spaces in Caption Bug
// @namespace   ""
// @match       https://github.com/*
// @grant       GM_registerMenuCommand
// @description Multiple spaces get reduced to a single space in the caption.
// ==/UserScript==

GM_registerMenuCommand("0        9", () => {return;});
  1. Go to a page on GitHub, and open the Violentmonkey menu

Problem:

The spaces in the menu caption have been reduced to a single space.

2025-01-13 20_01_56-

Expected result:

The menu caption should include all of the spaces. Note that the title in the status bar correctly displays all the spaces.

Environment:

  • OS: Windows
  • Browser: Brave, Version 1.73.105 Chromium: 131.0.6778.265 (Official Build) (64-bit)
  • Violentmonkey Version: 2.29.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions