Skip to content

Fix: implement CFXML entity escaping and unescaping - #153

Open
DTW-Thalion wants to merge 1 commit into
gnustep:masterfrom
DTW-Thalion:fix-cfxmlparser-escaping
Open

Fix: implement CFXML entity escaping and unescaping#153
DTW-Thalion wants to merge 1 commit into
gnustep:masterfrom
DTW-Thalion:fix-cfxmlparser-escaping

Conversation

@DTW-Thalion

Copy link
Copy Markdown
Contributor

CFXMLCreateStringByEscapingEntities and CFXMLCreateStringByUnescapingEntities returned NULL. Escaping now replaces the five predefined XML entities (&, <, >, " and ') with their references and copies other characters unchanged. Unescaping resolves those five named entities, decimal and hexadecimal numeric character references, and any names present in the supplied entities dictionary.

Tests/CFXMLParser/escaping.m covers both directions against values taken from Apple CoreFoundation. It fails before this change (the functions return NULL) and passes after.

CFXMLCreateStringByEscapingEntities and CFXMLCreateStringByUnescapingEntities
returned NULL.  Escaping replaces the five predefined XML entities (&, <,
>, " and ') with their references and copies other characters unchanged.
Unescaping resolves those five named entities, decimal and hexadecimal
numeric character references, and any names present in the supplied
entities dictionary.
@DTW-Thalion
DTW-Thalion force-pushed the fix-cfxmlparser-escaping branch from 83fe9f9 to 077f52d Compare July 24, 2026 15:22
@DTW-Thalion DTW-Thalion reopened this Jul 24, 2026
@DTW-Thalion DTW-Thalion reopened this Jul 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant