git: 8fdf179e0b - main - EC2 AMIs: Add .trim() to filtering script
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 24 Feb 2026 04:05:13 UTC
The branch main has been updated by cperciva:
URL: https://cgit.FreeBSD.org/doc/commit/?id=8fdf179e0b7bee5d168965bd9992b5569dee6dc0
commit 8fdf179e0b7bee5d168965bd9992b5569dee6dc0
Author: Colin Percival <cperciva@FreeBSD.org>
AuthorDate: 2026-02-24 03:58:45 +0000
Commit: Colin Percival <cperciva@FreeBSD.org>
CommitDate: 2026-02-24 04:05:07 +0000
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
---
website/content/en/releases/15.0R/ec2-ami-ids/latest.adoc | 8 ++++----
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 != "")