biocore/empress

When setting text in the DOM, use textContent instead of innerHTML

Offen

#216 geöffnet am 26.06.2020

 (0 Kommentare) (1 Reaktion) (0 zugewiesene Personen)JavaScript (32 Forks)auto 404
good first issuerefactoring

Repository-Metriken

Stars
 (56 Sterne)
PR-Merge-Metriken
 (PR-Metriken ausstehend)

Beschreibung

See the MDN docs on some of the downsides of setting things with innerHTML here.

This shouldn't be a huge problem since Empress visualizations are (as of writing) inherently client-side applications, but there's the potential for users to break things if their data includes bizarre names -- for example, a metadata column is named <b>i'm a problematic metadata column</b>, or something silly like that. (Also, more realistically, backslashes or ampersands might also cause problems with innerHTML.)

Contributor Guide