Opened on 04/10/2019 at 01:21:33 PM

Closed on 08/29/2019 at 05:43:52 PM

#7455 closed defect (rejected)

snippets arguments containing quotes

Reported by: agiammarchi Assignee:
Priority: Unknown Milestone:
Module: Core Keywords: closed-in-favor-of-gitlab
Cc: Blocked By:
Blocking: Platform: Unknown / Cross platform
Ready: no Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

Description (last modified by mjethani)

Summary

Any snippet that passes through parseScript function might be affected by a not so UX friendly bug.

How to reproduce

  1. Try to use site.xxx#$#abort-current-inline-script window.Object wi'n
  2. See the resulting RegExp will not match the string wi'n
  3. See that writing site.xxx#$#abort-current-inline-script window.Object wi\'n instead works, but see that writing an extra argument after won't

Observed behaviour

The parseScript function apparently eats, or misunderstands, single quotes parts of an argument that is being already parsed, and the resulting RegExp won't match the expected.

Expected behaviour

Either arguments containing ' should be mandatorily escaped and put in single quotes, or we need to change the parseScript logic so that when a single quote is encountered, but it's part of an argument being parsed (i.e. no space before) the quote shouldn't be considered as opener of the argument, but handled like any other chars.

This way expectations are preserved, and UX is improved for fancy cases, like in searching specific text that might contain single or double quotes.

Notes

This is a known quirk of the parser (#6853). We even have tests for it.

Attachments (0)

Change History (2)

comment:1 Changed on 04/10/2019 at 03:20:29 PM by mjethani

  • Description modified (diff)

comment:2 Changed on 08/29/2019 at 05:43:52 PM by sebastian

  • Keywords closed-in-favor-of-gitlab added
  • Resolution set to rejected
  • Status changed from new to closed

Sorry, but we switched to GitLab. If this issue is still relevant, please file it again in the new issue tracker.

Add Comment

Modify Ticket

Change Properties
Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none).
 
Note: See TracTickets for help on using tickets.