From aa1cc73a1a8bab2c6d89a43affba6a310c56c1c1 Mon Sep 17 00:00:00 2001 From: mic Date: Thu, 19 Feb 2026 22:21:48 +0100 Subject: [PATCH 1/9] added tom-select version check --- .../workflows/tom-select-release-check.yml | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 .github/workflows/tom-select-release-check.yml diff --git a/.github/workflows/tom-select-release-check.yml b/.github/workflows/tom-select-release-check.yml new file mode 100644 index 00000000..c9fe6711 --- /dev/null +++ b/.github/workflows/tom-select-release-check.yml @@ -0,0 +1,54 @@ +name: Check External Release + +on: + schedule: + - cron: '0 0 * * *' # Check every day at midnight + workflow_dispatch: # Allows manual triggering for testing purposes + +permissions: + contents: read + issues: write + +jobs: + check-and-notify: + runs-on: ubuntu-latest + steps: + - name: Get latest release from external repo + id: get_release + run: | + REPO_TARGET="orchidjs/tom-select" + LATEST_TAG=$(curl -s https://api.github.com/repos/$REPO_TARGET/releases/latest | jq -r .tag_name) + + if [ "$LATEST_TAG" == "null" ] || [ -z "$LATEST_TAG" ]; then + echo "Error: unable to fetch tag or no release found." + exit 1 + fi + + echo "tag=$LATEST_TAG" >> $GITHUB_OUTPUT + echo "target=$REPO_TARGET" >> $GITHUB_OUTPUT + + - name: Check if Issue already exists and create it + uses: actions/github-script@v7 + with: + script: | + const latestTag = "${{ steps.get_release.outputs.tag }}"; + const targetRepo = "${{ steps.get_release.outputs.target }}"; + const { owner, repo } = context.repo; + const issueTitle = `Update Tom Select to version ${latestTag}`; + + // Search through issues (both open and closed for safety) + const response = await github.rest.search.issuesAndPullRequests({ + q: `repo:${owner}/${repo} is:issue "${issueTitle}"`, + }); + + if (response.data.total_count > 0) { + core.info(`The issue for version ${latestTag} already exists. No action taken.`); + } else { + await github.rest.issues.create({ + owner, + repo, + title: issueTitle, + body: `Update Tom Select to version **${latestTag}**. https://github.com/orchidjs/tom-select/releases` + }); + core.info(`New issue created for version ${latestTag}.`); + } From ec0a955feb97cf462f0299b0b09f9f7e55f34c0e Mon Sep 17 00:00:00 2001 From: Mic Date: Thu, 19 Feb 2026 22:23:21 +0100 Subject: [PATCH 2/9] Rename workflow to Check Tom-Select Latest Release --- .github/workflows/tom-select-release-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tom-select-release-check.yml b/.github/workflows/tom-select-release-check.yml index c9fe6711..f556c964 100644 --- a/.github/workflows/tom-select-release-check.yml +++ b/.github/workflows/tom-select-release-check.yml @@ -1,4 +1,4 @@ -name: Check External Release +name: Check Tom-Select Latest Release on: schedule: From b2abad4b958bcfa49c88767b09bfd35cdfa20433 Mon Sep 17 00:00:00 2001 From: Mic Date: Thu, 19 Feb 2026 22:29:52 +0100 Subject: [PATCH 3/9] Enhance issue body with CDN links for Tom Select Updated the issue body to include CDN links for the latest Tom Select version. --- .github/workflows/tom-select-release-check.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tom-select-release-check.yml b/.github/workflows/tom-select-release-check.yml index f556c964..6e7c597a 100644 --- a/.github/workflows/tom-select-release-check.yml +++ b/.github/workflows/tom-select-release-check.yml @@ -48,7 +48,11 @@ jobs: owner, repo, title: issueTitle, - body: `Update Tom Select to version **${latestTag}**. https://github.com/orchidjs/tom-select/releases` + body: `Update Tom Select to version **${latestTag}**. + + https://cdn.jsdelivr.net/npm/tom-select@${latestTag}/dist/js/tom-select.base.js + + https://cdn.jsdelivr.net/npm/tom-select@${latestTag}/dist/css/tom-select.default.min.css` }); core.info(`New issue created for version ${latestTag}.`); } From bcc7a5f62b03e219d095c426f7c98fc76a8f7cfc Mon Sep 17 00:00:00 2001 From: Mic Date: Thu, 19 Feb 2026 22:30:59 +0100 Subject: [PATCH 4/9] Add reminder for VENDORS.md update in release check Added a reminder to update the VENDORS.md file when updating Tom Select. --- .github/workflows/tom-select-release-check.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tom-select-release-check.yml b/.github/workflows/tom-select-release-check.yml index 6e7c597a..a0f1002e 100644 --- a/.github/workflows/tom-select-release-check.yml +++ b/.github/workflows/tom-select-release-check.yml @@ -52,7 +52,9 @@ jobs: https://cdn.jsdelivr.net/npm/tom-select@${latestTag}/dist/js/tom-select.base.js - https://cdn.jsdelivr.net/npm/tom-select@${latestTag}/dist/css/tom-select.default.min.css` + https://cdn.jsdelivr.net/npm/tom-select@${latestTag}/dist/css/tom-select.default.min.css + + Remeber also to update the VENDORS.md file.` }); core.info(`New issue created for version ${latestTag}.`); } From e8e6c86be1a86c81766b8ec4da46a1d85e8f681e Mon Sep 17 00:00:00 2001 From: mic Date: Sun, 22 Feb 2026 22:22:22 +0100 Subject: [PATCH 5/9] getMailHeader now returns always a string. sanitizeMailHeaders method added. see #672 --- js/mzta-utils.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/js/mzta-utils.js b/js/mzta-utils.js index 67ce0823..601a082c 100644 --- a/js/mzta-utils.js +++ b/js/mzta-utils.js @@ -194,7 +194,8 @@ export async function getMailHeader(curr_message, mail_header_id) { let full_message = await browser.messages.getFull(curr_message.id); // console.log(">>>>>>>>>>>> getMailHeader full_message: " + JSON.stringify(full_message)); if(full_message.hasOwnProperty("headers") && Object.keys(full_message.headers).some(header => header.toLowerCase() === mail_header_id.toLowerCase())){ - mail_header_value = full_message.headers[Object.keys(full_message.headers).find(header => header.toLowerCase() === mail_header_id.toLowerCase())]; + const raw_value = full_message.headers[Object.keys(full_message.headers).find(header => header.toLowerCase() === mail_header_id.toLowerCase())]; + mail_header_value = Array.isArray(raw_value) ? raw_value.join(", ") : raw_value; } // console.log(">>>>>>>>>>>> getMailHeader mail_header_value: " + mail_header_value) return mail_header_value; @@ -205,6 +206,12 @@ export function sanitizeHtml(input) { return input.replace(/<(?!br\s*\/?)[^>]+>/gi, ''); } +export function sanitizeMailHeaders(input){ + console.log(">>>>>>>>>>>> sanitizeMailHeaders input: " + JSON.stringify(input)); + if(!input) return ''; + return input.replace(//g, '>'); +} + export function stripHtmlKeepLines(htmlString) { // Replaces

tags with a newline at the beginning // and removes all other HTML tags From 3510636eb36ee97dfdf67e596157738980951bfc Mon Sep 17 00:00:00 2001 From: mic Date: Sun, 22 Feb 2026 22:23:24 +0100 Subject: [PATCH 6/9] using sanitizeMailHeaders when needed. see #672 --- js/mzta-placeholders.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/js/mzta-placeholders.js b/js/mzta-placeholders.js index bfb841c7..ad169f8d 100644 --- a/js/mzta-placeholders.js +++ b/js/mzta-placeholders.js @@ -17,7 +17,10 @@ */ import { prefs_default } from '../options/mzta-options-default.js'; -import { getMailHeader } from './mzta-utils.js'; +import { + getMailHeader, + sanitizeMailHeaders + } from './mzta-utils.js'; /* ================= PLACEHOLDERS PROPERTIES ======================================== @@ -509,7 +512,7 @@ export const placeholdersUtils = { finalSubs['mail_folder_path'] = placeholdersUtils.failSafePlaceholders(curr_message.folder?.path); break; case 'mail_headers': - finalSubs['mail_headers:' + currPH.custom_value] = placeholdersUtils.failSafePlaceholders(await getMailHeader(curr_message, currPH.custom_value)); + finalSubs['mail_headers:' + currPH.custom_value] = placeholdersUtils.failSafePlaceholders(sanitizeMailHeaders(await getMailHeader(curr_message, currPH.custom_value))); break; case 'selected_text': finalSubs['selected_text'] = placeholdersUtils.failSafePlaceholders(selection_text); @@ -518,13 +521,13 @@ export const placeholdersUtils = { finalSubs['selected_html'] = placeholdersUtils.failSafePlaceholders(selection_html); break; case 'author': - finalSubs['author'] = placeholdersUtils.failSafePlaceholders(curr_message.author); + finalSubs['author'] = placeholdersUtils.failSafePlaceholders(sanitizeMailHeaders(curr_message.author)); break; case 'recipients': - finalSubs['recipients'] = placeholdersUtils.failSafePlaceholders(curr_message.recipients?.join(", ")); + finalSubs['recipients'] = placeholdersUtils.failSafePlaceholders(sanitizeMailHeaders(curr_message.recipients?.join(", "))); break; case 'cc_list': - finalSubs['cc_list'] = placeholdersUtils.failSafePlaceholders(curr_message.ccList?.join(", ")); + finalSubs['cc_list'] = placeholdersUtils.failSafePlaceholders(sanitizeMailHeaders(curr_message.ccList?.join(", "))); break; case 'junk_score': finalSubs['junk_score'] = placeholdersUtils.failSafePlaceholders(curr_message.junkScore); From a8a04df0a8c260c646f7f2beeaee4329856aff9b Mon Sep 17 00:00:00 2001 From: mic Date: Sun, 22 Feb 2026 22:26:10 +0100 Subject: [PATCH 7/9] version set to 3.8.5. release notes updated --- CHANGELOG.md | 4 ++++ manifest.json | 2 +- options/mzta-release-notes.html | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bdfdc8c2..e2d3a870 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ +

Version 3.8.5 - 22/02/2026

+
    +
  • Fix: Correctly showing email addresses when using mail headers in data placeholders [#672].
  • +

Version 3.8.4 - 10/02/2026

  • [ChatGPT Web] Fix: Correctly importing the selected text into the compose windows also when ChatGPT shows the advanced mail editor in the response [#646].
  • diff --git a/manifest.json b/manifest.json index 5c77e980..e5f5608a 100644 --- a/manifest.json +++ b/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 2, "name": "ThunderAI", "description": "__MSG_extensionDescription__", - "version": "3.8.4", + "version": "3.8.5", "author": "Mic (m@micz.it)", "homepage_url": "https://micz.it/thunderbird-addon-thunderai/", "browser_specific_settings": { diff --git a/options/mzta-release-notes.html b/options/mzta-release-notes.html index 33f60cf8..d97949b5 100644 --- a/options/mzta-release-notes.html +++ b/options/mzta-release-notes.html @@ -7,6 +7,10 @@

    ThunderAI Release Notes

    +

    Version 3.8.5 - 22/02/2026

    +
      +
    • Fix: Correctly showing email addresses when using mail headers in data placeholders [#672].
    • +

    Version 3.8.4 - 10/02/2026

    • [ChatGPT Web] Fix: Correctly importing the selected text into the compose windows also when ChatGPT shows the advanced mail editor in the response [#646].
    • From a355dfb6d6c4f2f885e6baf8d0071ecf6760c16f Mon Sep 17 00:00:00 2001 From: Mic Date: Mon, 23 Feb 2026 21:59:34 +0100 Subject: [PATCH 8/9] Add 'enhancement' label to new issue creation Added 'enhancement' label to the issue creation in the workflow. --- .github/workflows/tom-select-release-check.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tom-select-release-check.yml b/.github/workflows/tom-select-release-check.yml index a0f1002e..1ba3394b 100644 --- a/.github/workflows/tom-select-release-check.yml +++ b/.github/workflows/tom-select-release-check.yml @@ -48,13 +48,14 @@ jobs: owner, repo, title: issueTitle, + labels: ['enhancement'], body: `Update Tom Select to version **${latestTag}**. https://cdn.jsdelivr.net/npm/tom-select@${latestTag}/dist/js/tom-select.base.js https://cdn.jsdelivr.net/npm/tom-select@${latestTag}/dist/css/tom-select.default.min.css - Remeber also to update the VENDORS.md file.` + Remember also to update the VENDORS.md file.` }); core.info(`New issue created for version ${latestTag}.`); } From d3246417a9e59614d17b0b4ab357e84f558c1272 Mon Sep 17 00:00:00 2001 From: Mic Date: Tue, 24 Feb 2026 21:03:39 +0100 Subject: [PATCH 9/9] Change cron schedule to check daily at 19:00 --- .github/workflows/tom-select-release-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tom-select-release-check.yml b/.github/workflows/tom-select-release-check.yml index 1ba3394b..eb51f281 100644 --- a/.github/workflows/tom-select-release-check.yml +++ b/.github/workflows/tom-select-release-check.yml @@ -2,7 +2,7 @@ name: Check Tom-Select Latest Release on: schedule: - - cron: '0 0 * * *' # Check every day at midnight + - cron: '0 19 * * *' # Check every day at 19:00 workflow_dispatch: # Allows manual triggering for testing purposes permissions: