mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-05-30 19:10:42 -04:00
If there is whitespace in the element containing the value to be copied then Firefox[1] includes that space in the value it puts in the clipboard. This is obviously annoying since `foo-bar` might be a valid API key where `foo-bar ` is not. This commit fixes that by using the `-` in Jinja to gobble whitespace. I also looked at doing this in the Javascript, but the browser API for selecting some text and copying it doesn’t give an obvious place for using `String.prototype.trim()`. 1. Tested with Firefox 100.0 on Mac OS 12.2.1