GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Single quote in script name breaks the user script · Issue #3035 · greasemonkey/greasemonkey

Single quote in script name breaks the user script #3035

New issue
Copy link
New issue
Copy link
Closed
Closed
Single quote in script name breaks the user script#3035
Copy link
Milestone
4.9

Description

@LMLB
LMLB
opened on May 9, 2019
Issue body actions

greasemonkey/src/user-script-obj.js

Line 333 in 6829e4d

console.error('Script error in ${this.toString()}:'

this.toString() is inserted without escaping the \ and ' characters.

Example that reproduces the issue:

// ==UserScript==
// @name Single quote ' test
// @include *
// ==/UserScript==
console.log('Single quote test');
Reacted by Cerberus-tm, Stig Nygaard and Ricardo Mendonça Ferreira

Activity

  1. Cerberus-tm commented on May 11, 2019

    @Cerberus-tm
    Cerberus-tm
    on May 11, 2019
    Contributor
    More actions

    I have experienced this bug too. And it must be new, because all of a sudden one of my userscripts gave a mysterious error in the browser console, and it just failed to execute altogether. It had been functioning perfectly since forever.

    @LMLB So it was very hard for me to locate this error. How did you do it?

    Reacted by Stig Nygaard
  2. StigNygaard commented on May 17, 2019

    @StigNygaard
    StigNygaard
    on May 17, 2019
    More actions

    Confirmed. But there's more to the problem.

    I have several userscripts named something like "Stig's scriptname". Some of them was working, but one wasn't working for me. The one that wasn't working didn't seem to be activate at all. I couldn't get it to write anything in the console.

    After some experiments including turning scripts on and off (and seeing this issue), I have come to the conclusion:

    1. If script is already installed, enabled and working, it will continue to work if you don't mess around with it (Until it is updated).
    2. If you disable a script, you cannot get it working again by re-enabling it :-( It seems to be permanently disabled (or in a non-working state) even though status says it is enabled.

    Me too think it must be a recent problem, probably caused by latest Greasemonkey update.

    A couple of days ago I released an update to Stig's Flickr Fixr, thus probably "disabling" the script for all current Greasemonkey users. Now I better hold back updating my two other userscripts, Stig's Art Grabr and Stig's Last.fm Album Linkr, until Greasemonkey has been updated, to avoid "disabling" them too?

  3. AltoRetrato commented on May 28, 2019

    @AltoRetrato
    AltoRetrato
    on May 28, 2019
    More actions

    I've met this issue as well. Hoping that a new release will fix this soon!

  4. StigNygaard commented on Jun 2, 2019

    @StigNygaard
    StigNygaard
    on Jun 2, 2019
    More actions

    Hi @arantius
    Assuming @BadBrainz 's commit fixes this problem, what is the ETA of a new Greasemonkey release? Will we wait for other stuff before releasing a new version? Yes, I'm a bit impatient ...

  5. arantius
    added this to the 4.9 milestone on Jun 12, 2019
  6. arantius
    added a commit that references this issue on Jun 12, 2019

    Make the test actually fail (before the fix).

    b3228dd
  7. arantius commented on Jun 12, 2019

    @arantius
    arantius
    on Jun 12, 2019
    Collaborator
    More actions

    Manually merged the PR with an additional fix.

    Reacted by Cerberus-tm
  8. arantius
    closed this as completedon Jun 12, 2019
  9. StigNygaard commented on Jun 12, 2019

    @StigNygaard
    StigNygaard
    on Jun 12, 2019
    More actions

    And all seems normal again in 4.9. Thanks :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      • 4.9

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.