Concrete example from my own snippet:
Before (GitHub source): $routes = ["/wp/v2/users", "/wp/v2/users/(?P<id>[\d]+)"];
After (pulled into SnipVault / deployed): $routes = ["/wp/v2/users", "/wp/v2/users/(?P<id>[d]+)"];
The \d became d — the backslash was silently dropped, breaking the regex.
Steps to reproduce:
Push a snippet containing a literal backslash (e.g. a regex like \d) to the linked GitHub repo.
Pull that snippet into SnipVault.
Compare: the GitHub source still has \d, but the pulled/deployed snippet now has d — the backslash is gone.
Impact: Any snippet content containing backslash escapes (regex patterns, \n, Windows paths, etc.) is silently corrupted on pull, with no error or warning. In my case this broke a regex-based permission check that was meant to restrict access to a REST API endpoint — it deployed "successfully" but the protection silently didn't work, and there was no indication anything was wrong.
Suspected cause: Looks like stripslashes() (or wp_unslash()) is being applied somewhere in the GitHub pull path — its documented behavior is exactly this: \d → d, backslash dropped whenever it precedes a character with no special meaning.
Thank you.
Please authenticate to join the conversation.
In Review
Feature Request
About 22 hours ago

pearlknowledge
Get notified by email when there are changes.
In Review
Feature Request
About 22 hours ago

pearlknowledge
Get notified by email when there are changes.