diff options
| author | Colin Percival <cperciva@FreeBSD.org> | 2026-02-24 03:58:45 +0000 |
|---|---|---|
| committer | Colin Percival <cperciva@FreeBSD.org> | 2026-02-24 04:05:07 +0000 |
| commit | 8fdf179e0b7bee5d168965bd9992b5569dee6dc0 (patch) | |
| tree | a3d0693ae88f20e3aaf8449d4b06ea0189ea75e6 | |
| parent | 5e3d1d7555487f09ba3c854fe3587c24e900a3f1 (diff) | |
EC2 AMIs: Add .trim() to filtering script
The FreeBSD website uses HTML Tidy, which adds whitespace inside the
table of EC2 AMIs; I didn't notice this when I was testing locally
because it didn't run there. This results in the filtering breaking
since e.g. "ufs" does not match "\nufs\n".
Addding .trim() to the filtering script removes the extra whitespace
which HTML Tidy added.
PR: 293397
| -rw-r--r-- | website/content/en/releases/15.0R/ec2-ami-ids/latest.adoc | 8 | ||||
| -rw-r--r-- | website/content/en/releases/15.0R/ec2-ami-ids/release.adoc | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/website/content/en/releases/15.0R/ec2-ami-ids/latest.adoc b/website/content/en/releases/15.0R/ec2-ami-ids/latest.adoc index 781d54243e..9651592c37 100644 --- a/website/content/en/releases/15.0R/ec2-ami-ids/latest.adoc +++ b/website/content/en/releases/15.0R/ec2-ami-ids/latest.adoc @@ -580,10 +580,10 @@ function filter_table() { const filter_fs_val = document.getElementById('filter_fs').value; for (row of rows) { const cells = row.getElementsByTagName('td'); - const region = cells[0].textContent; - const arch = cells[1].textContent; - const flavour = cells[2].textContent; - const fs = cells[3].textContent; + const region = cells[0].textContent.trim(); + const arch = cells[1].textContent.trim(); + const flavour = cells[2].textContent.trim(); + const fs = cells[3].textContent.trim(); visible = 1; console.log(region); if (region != filter_region_val && filter_region_val != "") diff --git a/website/content/en/releases/15.0R/ec2-ami-ids/release.adoc b/website/content/en/releases/15.0R/ec2-ami-ids/release.adoc index 85234ca921..7850caf49d 100644 --- a/website/content/en/releases/15.0R/ec2-ami-ids/release.adoc +++ b/website/content/en/releases/15.0R/ec2-ami-ids/release.adoc @@ -578,10 +578,10 @@ function filter_table() { const filter_fs_val = document.getElementById('filter_fs').value; for (row of rows) { const cells = row.getElementsByTagName('td'); - const region = cells[0].textContent; - const arch = cells[1].textContent; - const flavour = cells[2].textContent; - const fs = cells[3].textContent; + const region = cells[0].textContent.trim(); + const arch = cells[1].textContent.trim(); + const flavour = cells[2].textContent.trim(); + const fs = cells[3].textContent.trim(); visible = 1; console.log(region); if (region != filter_region_val && filter_region_val != "") |
