github / github/markdown-toolbar-element

Bug with unescaped value interpolated into a selector query

Offen
#16 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
JavaScript
Sterne
411
Forks
60
Ø Merge
2 T. 22 Std.
Gemergte PRs (30 T.)
6

Beschreibung

```
SyntaxError: Failed to execute 'querySelector' on 'Element': '[hotkey="""]' is not a valid selector.
```

https://github.com/github/markdown-toolbar-element/blob/c3630f64cddd29a98bb8b03965e9baa83f585dc4/index.js#L230

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Read index.js around line 230 and reproduce the reported querySelector failure using a hotkey value containing a quote. Trace how that value is interpolated into the selector; the issue is done when the reported value no longer produces an invalid selector and the behavior is verified.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
javascript
Bereich
frontend
Issue-Typ
Bug
Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
58/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.