v3.1.4 - Black Friday 🎁, Nov 28th, 2025
What's New in v3.1.4
🔧 Critical Fix: URL_DOMAIN_FIXES Processing Order
This release fixes a critical bug in URL_DOMAIN_FIXES processing that could cause domains with existing protocols to be incorrectly modified.
The Problem:
In v3.1.3, the regex pattern for domain fixes used a negative lookbehind ((?<!https?:\/\/)) which is not supported in ES5 runtime. While the script compiled without errors, this caused:
- Domains with existing
https://orhttp://protocols to be processed incorrectly - Potential duplicate protocol prefixes in some edge cases
- Unpredictable behavior when domains appeared multiple times in content
The Solution:
Replaced the negative lookbehind with a two-pattern approach that explicitly handles both cases:
-
Pattern 1 (runs FIRST): Protects already valid URLs
- Matches:
https://domainorhttp://domain - Action: Replaces with itself (no modification)
- Purpose: Prevents double-processing of valid URLs
- Matches:
-
Pattern 2 (runs SECOND): Adds
https://to bare domains- Matches: Bare domains at word boundaries
- Action: Adds
https://prefix - Purpose: Fixes domains missing protocol
Technical Implementation:
// Pattern 1: Protect valid URLs (https://domain or http://domain)
domainPatterns.push({
pattern: "(https?:\\/\\/)" + escapedDomain + "(\\/[^\\s]*|[\\s]|$)",
replacement: "$1" + domain + "$2",
flags: "gm",
literal: false
});
// Pattern 2: Add https:// to bare domains at boundaries
domainPatterns.push({
pattern: "(^|[\\s\\(\\[\\{<\"'])" + escapedDomain + "(\\/[^\\s\\)\\]\\}>\"',;]*|[\\s\\)\\]\\}>\"',;]|$)",
replacement: "$1https://" + domain + "$2",
flags: "gm",
literal: false
});Key Features:
- ✅ ES5 Compatible: No negative lookbehind required
- ✅ Order-Dependent: Pattern 1 runs before Pattern 2 to prevent conflicts
- ✅ Boundary-Aware: Pattern 2 respects word boundaries to avoid matching substrings
- ✅ Path-Preserving: Both patterns preserve URL paths correctly
🔤 Unicode Normalization
- Fixed mojibake characters in comments and string literals throughout the codebase
- Corrected display of Czech characters (např., příspěvek)
- Fixed ellipsis character (…) representation in comments
- Normalized emoji rendering (𝕏, 🦋, 📝, 💬, 📤, 🖼️, 🔗)
- Improved character encoding for ampersand safe character (⅋)
These are cosmetic fixes that improve code readability without affecting functionality.
Migration from v3.1.3
This is a bug fix release. No configuration changes are required.
Recommended Actions:
- Replace your current script with v3.1.4
- If you use
URL_DOMAIN_FIXES, test with content containing:- Domains with existing
https://prefixes - Bare domains without protocols
- Multiple occurrences of the same domain
- Domains with existing
- Verify that URLs are processed correctly
Breaking Changes:
- None. This release maintains full backward compatibility.
Testing
All existing tests pass with 100% success rate. Additional test coverage added for:
- URL_DOMAIN_FIXES with existing protocols
- Multiple occurrences of domains in content
- Mixed protocol scenarios
Installation
- Copy the entire content of
example-ifttt-filter-x-xcom-3_1_4.ts - Paste into your IFTTT applet filter code
- Configure
SETTINGSaccording to your needs - Test with beta bot before production deployment
File Information
- Filename:
example-ifttt-filter-x-xcom-3_1_4.ts - Size: ~64KB (within IFTTT limits)
- TypeScript Version: 2.9.2 (ES5 compatible)
- IFTTT Runtime: ES5
Known Issues
None at this time.
Next Steps
- Monitor production deployment for 24-48 hours
- Consider URL_DOMAIN_FIXES enhancements for future versions
- Continue optimization of regex patterns for performance
Related Files
- Main script:
example-ifttt-filter-x-xcom-3_1_4.ts - Documentation: See
Unified_Filter_Guide__-_v3_1_0.mdfor complete usage guide - Settings reference: See
Settings_for_IFTTT_filter_script_-_v3_1_0.md
Credits
Developed and maintained by Daniel for Zprávobot.news
License
This script is part of the Zprávobot.news project.