Skip to content

docs: note GetBible colon URL-encoding gotcha#7

Open
bcordis wants to merge 1 commit into
mainfrom
docs/getbible-url-encoding
Open

docs: note GetBible colon URL-encoding gotcha#7
bcordis wants to merge 1 commit into
mainfrom
docs/getbible-url-encoding

Conversation

@bcordis

@bcordis bcordis commented Jul 1, 2026

Copy link
Copy Markdown
Member

Summary

Documents a GetBible-specific URL-encoding gotcha in CLAUDE.md. The GetBible v2 endpoint (https://query.getbible.net/v2/{translation}/{reference}) rejects %3A for the chapter:verse colon — the colon must be sent literally.

The doc records the pattern already implemented in GetBibleProvider::getPassage():

$encodedRef = str_replace('%3A', ':', rawurlencode($apiRef));

This is doc-only; no code changes. Verified against src/Bible/Provider/GetBibleProvider.php:68.

Why

urlencode() breaks spaces (+) and rawurlencode() alone encodes the colon to %3A — either would silently break GetBible requests. Documenting it prevents a regression during future refactors.

🤖 Generated with Claude Code

GetBible's v2 endpoint rejects %3A in references like 'Luke 7:36-38';
the colon must stay literal. Document the rawurlencode + str_replace
pattern already used in GetBibleProvider so future changes preserve it.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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