Skip to content

Stop the unsubscribe guard from blocking every real signature - #10

Merged
EnesYilmazcode merged 1 commit into
mainfrom
fix/unsubscribe-guard-blocks-everything
Aug 9, 2026
Merged

EnesYilmazcode merged 1 commit into
mainfrom
fix/unsubscribe-guard-blocks-everything

Conversation

@EnesYilmazcode

Copy link
Copy Markdown
Owner

fix: stop the unsubscribe guard from blocking every real signature

The extension found the signature and then refused to delete it. Reported from
a live Gmail compose window: loaded, enabled, correct selector, nothing removed.

removeBlock() skipped any block whose text matched /unsubscribe|opt.out|.../
when keepUnsubscribe was on, which is the default. Signature variants 17 and 18
both render an "Unsubscribe" or "Opt out" link into every ordinary email, so the
text match fired on essentially every signature Mailsuite produces. The guard
meant to protect bulk mail was quietly disabling the entire extension.

Captured markup from the live compose window shows why the text was never the
right thing to look at:

Opt out

That href is the unsubstituted campaign placeholder. Mailsuite only fills it in
when a Campaign actually goes out, so on a one-to-one email it is a dead link
wearing the word "Opt out".

hasLiveUnsubscribe() now checks whether the link goes anywhere: an anchor with
the placeholder href is ignored, a real unsubscribe URL still protects the
block. Campaign mail keeps its legally required link, ordinary mail loses the
advert.

Three tests from the captured DOM, verbatim including the timestamp cell and the
Remove button: the live v18 signature is removed under default settings, the
placeholder is not mistaken for a live link, and a substituted real unsubscribe
URL is still kept.

19 tests, all passing. Version 0.2.1.

Co-Authored-By: Claude Opus 5 (1M context) noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_013rTepGiDUe15iPn6XqmKjy

The extension found the signature and then refused to delete it. Reported from
a live Gmail compose window: loaded, enabled, correct selector, nothing removed.

removeBlock() skipped any block whose text matched /unsubscribe|opt.out|.../
when keepUnsubscribe was on, which is the default. Signature variants 17 and 18
both render an "Unsubscribe" or "Opt out" link into every ordinary email, so the
text match fired on essentially every signature Mailsuite produces. The guard
meant to protect bulk mail was quietly disabling the entire extension.

Captured markup from the live compose window shows why the text was never the
right thing to look at:

  <a href="https://##mt_unsubscribe_link##">Opt out</a>

That href is the unsubstituted campaign placeholder. Mailsuite only fills it in
when a Campaign actually goes out, so on a one-to-one email it is a dead link
wearing the word "Opt out".

hasLiveUnsubscribe() now checks whether the link goes anywhere: an anchor with
the placeholder href is ignored, a real unsubscribe URL still protects the
block. Campaign mail keeps its legally required link, ordinary mail loses the
advert.

Three tests from the captured DOM, verbatim including the timestamp cell and the
Remove button: the live v18 signature is removed under default settings, the
placeholder is not mistaken for a live link, and a substituted real unsubscribe
URL is still kept.

19 tests, all passing. Version 0.2.1.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013rTepGiDUe15iPn6XqmKjy
@EnesYilmazcode
EnesYilmazcode merged commit 7fb3051 into main Aug 9, 2026
1 check passed
@EnesYilmazcode
EnesYilmazcode deleted the fix/unsubscribe-guard-blocks-everything branch August 9, 2026 02:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant