You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Brief Description
Validator API will return incorrect line counts for schema and ruleset violations if file uses old Mac-style CR only line endings.
The Validator has to manually count lines for violation reporting because it splits up IATI XML activity files by activity, generating a new XML DOM object for each. The code which counts lines just counts LR characters; it is here:
This means line counts will be inaccurate if the file uses any single CR as line endings.
Severity
Low
The text was updated successfully, but these errors were encountered:
simon-20
changed the title
Validator API will return incorrect line counts for schema and ruleset violations if file uses old Mac-style CR only line endings
Validator API returns incorrect line counts for schema and ruleset violations if file uses old Mac-style CR only line endings
Mar 13, 2024
Although very few desktop/development systems use CR-only line endings, plenty of files in the IATI corpus have mixed line endings where at least some lines are CR. Such files are valid XML.
Brief Description
Validator API will return incorrect line counts for schema and ruleset violations if file uses old Mac-style
CR
only line endings.The Validator has to manually count lines for violation reporting because it splits up IATI XML activity files by activity, generating a new XML DOM object for each. The code which counts lines just counts
LR
characters; it is here:js-validator-api/services/rulesValidator.js
Line 953 in 769bcd5
This means line counts will be inaccurate if the file uses any single
CR
as line endings.Severity
Low
The text was updated successfully, but these errors were encountered: