-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FoLiA-txt fails on control character #46
Comments
… from the input. They were often propagated to the XML output still producing invalid XML in the end (LanguageMachines/foliautils#46)
…ey never end up in text content (LanguageMachines/foliautils#46)
I'm adjusting this in libfolia itself, it will do stripping of all non-allowed control characters. This does technically violate the principle of not manipulating the incoming data, but I think it's justifiable in this case. Ending up with invalid XML as was the current situation would be worse. (the alternative would a hard failure, which is what foliapy does upon serialisation). |
IMHO this libfolia patch to exterminate control characters is using a sledgehammer to crack a nut. NOTE: as such, Control-Characters are not forbidden in XML, provided they are encoded correctly. So isn't this a signal that something else is wrong? |
I did adapt
They are? That wouldn't make much sense, I tried:
|
Of course , i stand corrected. this only accepted for xml version 1.1 and upward. You state that removing control characters is a forced thing, so I assume that NOT to be the default? |
it IS the default now (because not removing them would lead to invalid xml). |
It seems FoLiA-txt manages to retain some control characters from the input and propagates it to the output text, leading to invalid XML. (reported by @martinreynaert in #45)
The text was updated successfully, but these errors were encountered: