From bf3d4cbc131c8332b12d27ed2b62085ad9abdd20 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Mon, 6 Jul 2020 13:26:58 -0700 Subject: [PATCH] doc: document that whitespace is ignored in base64 decoding Fixes: https://github.com/nodejs/node/issues/8569 PR-URL: https://github.com/nodejs/node/pull/34227 Reviewed-By: Ben Noordhuis Reviewed-By: Anna Henningsen Reviewed-By: Trivikram Kamat Reviewed-By: Luigi Pinca --- doc/api/buffer.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/api/buffer.md b/doc/api/buffer.md index 1907c6233b480d..7b96842c12573b 100644 --- a/doc/api/buffer.md +++ b/doc/api/buffer.md @@ -111,7 +111,8 @@ string into a `Buffer` as decoding. * `'base64'`: [Base64][] encoding. When creating a `Buffer` from a string, this encoding will also correctly accept "URL and Filename Safe Alphabet" as - specified in [RFC 4648, Section 5][]. + specified in [RFC 4648, Section 5][]. Whitespace characters such as spaces, + tabs, and new lines contained within the base64-encoded string are ignored. * `'hex'`: Encode each byte as two hexadecimal characters. Data truncation may occur when decoding string that do exclusively contain valid hexadecimal