Skip to content

Upd. Code. Make patterns for case-insensitivity and improve helper me… - #883

Merged
svfcode merged 2 commits into
devfrom
upd-ce-fix-incorrect-mailto
Sep 8, 2026
Merged

Upd. Code. Make patterns for case-insensitivity and improve helper me…#883
svfcode merged 2 commits into
devfrom
upd-ce-fix-incorrect-mailto

Conversation

@svfcode

@svfcode svfcode commented Sep 8, 2026

Copy link
Copy Markdown
Member

@codecov

codecov Bot commented Sep 8, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 30.27%. Comparing base (3196436) to head (8ea4369).

Files with missing lines Patch % Lines
...antalk/ApbctWP/ContactsEncoder/ContactsEncoder.php 0.00% 1 Missing ⚠️

❌ Your patch check has failed because the patch coverage (0.00%) is below the target coverage (70.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff            @@
##                dev     #883   +/-   ##
=========================================
  Coverage     30.27%   30.27%           
  Complexity     6592     6592           
=========================================
  Files           292      292           
  Lines         26432    26432           
=========================================
  Hits           8001     8001           
  Misses        18431    18431           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The changes are small, localized, and consistently apply case-insensitive handling for URI schemes; only a minor naming clarity nit was identified.

Pull request overview

This PR updates the contacts-encoding logic to treat mailto: and tel: URI schemes as case-insensitive, improving detection and encoding when clients emit variants like Mailto:/Tel:.

Changes:

  • Switched helper scheme checks from strpos() to stripos() for case-insensitive detection.
  • Introduced case-insensitive regex scheme fragments ((?i:mailto):, (?i:tel):) and applied them across the encoder’s phone/email patterns.
  • Updated scheme stripping in mailto/tel encoders to be case-insensitive (preg_replace(.../i)).
File summaries
File Description
lib/Cleantalk/Common/ContactsEncoder/Helper/ContactsEncoderHelper.php Makes mailto:/tel: detection case-insensitive in helper methods.
lib/Cleantalk/Common/ContactsEncoder/ContactsEncoder.php Applies case-insensitive scheme handling consistently in regex patterns and scheme stripping.
lib/Cleantalk/ApbctWP/ContactsEncoder/ContactsEncoder.php Makes form-field mailto detection case-insensitive before modifying content.
Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread lib/Cleantalk/Common/ContactsEncoder/ContactsEncoder.php Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The changes are small, cohesive, and consistently implement case-insensitive scheme handling without introducing observable logic issues in the affected flows.

Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@svfcode
svfcode merged commit b6df611 into dev Sep 8, 2026
9 of 10 checks passed
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.

2 participants