HomeClusterLabs Projects

parser: Allow a non-breaking space as 'whitespace'

Description

parser: Allow a non-breaking space as 'whitespace'

non-breaking spaces are depressingly easy to enter in some
editors and can make a mess of a corosync.conf file, as the
character can break keyword names and generate some very strange
error messages.

So here we include it (0xA0) as a valid whitespace character.
The (unsigned char) cast is for portability - Intel systems use
signed chars so we'd need something there, but this should
protect us against unsigned char systems too.

No attempt is made to protect against UTF-8 characters, that's very
much out of scope for this project I suspect.

ref: https://github.com/corosync/corosync/issues/723

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>

Details

Provenance
chrissie-cAuthored on Aug 7 2023, 7:59 AM
jfriesseCommitted on Aug 9 2023, 3:48 AM
Parents
rC149c64725f3e: spec: Migrate to SPDX license
Branches
Unknown
Tags
Unknown

Event Timeline