@sendinel/mcp-server 1.0.8 → 1.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -55,14 +55,26 @@ function escapeAttr(value) {
55
55
  function cleanAlign(value) {
56
56
  return value === 'center' || value === 'right' ? value : 'left';
57
57
  }
58
+ // RFC 2606 reserved domains — the model sometimes invents one of these as a
59
+ // placeholder destination instead of using the {{cta_url}} merge tag, which
60
+ // would ship a dead link if nobody catches it in review.
61
+ const PLACEHOLDER_URL_HOSTS = /(^|\.)(example|test|invalid)\.(com|org|net)$/i;
58
62
  function cleanUrl(value) {
59
63
  const url = cleanText(value, 2000);
60
- if (/^https?:\/\//i.test(url))
61
- return url;
62
64
  if (/^mailto:[^\s<>"]+@[^\s<>"]+$/i.test(url))
63
65
  return url;
64
66
  if (/^\{\{[A-Za-z0-9_.-]+\}\}$/.test(url))
65
67
  return url;
68
+ if (/^https?:\/\//i.test(url)) {
69
+ try {
70
+ if (PLACEHOLDER_URL_HOSTS.test(new URL(url).hostname))
71
+ return '';
72
+ }
73
+ catch {
74
+ return '';
75
+ }
76
+ return url;
77
+ }
66
78
  return '';
67
79
  }
68
80
  function cleanImageUrl(value) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sendinel/mcp-server",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "description": "AI-controlled email operations control plane for campaigns, contacts, segments, analytics, and multi-provider sending via MCP.",
5
5
  "mcpName": "ai.sendinel/mcp-server",
6
6
  "type": "module",