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
User then opens the leo file in a plain old text editor like Vim.
User then adds a CDATA section to an t element in a tnodes section.
User then re-opens the file in leo GUI and saves the file
Problem
Upon save, Leo editor strips out the XML CDATA
This is a problem because some users may not want to have their data XML-Escaped, and instead preserved as raw text with absolutely no leo-based modifications.
Question
Is there a setting or option that preserves the CDATA applied to tnodes/t element in leo?
The text was updated successfully, but these errors were encountered:
This page shows there is no separate cdata handler. Googling "python xml.sax cdata" yields this page, which indicates that cdata comes in as part of the characters content handler.
Alas, Leo's content handler strips '\r' characters, and converts to unicode if necessary, though that usually is not necessary. So it appears that preserving cdata unchanged will not be easy.
Happily, neither you nor your scripts should ever need to munge any .leo file by inserting cdata elements. Instead, you should use uA's to add content to nodes. You can add uA's to any node, regardless of whether the node is in an @<file> tree or not. The str_ convention should allow any cdata to come in unchanged.
I am going to close this issues for now. Please reopen if there are problems using uA's to do what you want.
Context
Scenario
Problem
Question
Is there a setting or option that preserves the CDATA applied to tnodes/t element in leo?
The text was updated successfully, but these errors were encountered: