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
Version: MultiMarkdown 6 v6.6.0 Problem Description: In attempting to insert a custom paragraph style into a document's FODT header, I found that the ODF Header metadata field, which is described in the documentation as being useful for such tasks, produces a result that cannot be validly inserted into the file, because all of the XML characters within the metadata value field are escaped, and the string is injected into a place that greatly reduces its utility.
<office:meta>
<dc:title>Test ODF Header Insertion</dc:title>
<dc:creator>AmberHaelo</dc:creator>
<meta:user-definedmeta:name="customfield">If all we can do is insert XML into the office:meta element, we might as well just use custom metadata fields.</meta:user-defined>
<office:styles><style:style style:name="Scene_20_Break" style:display-name="Scene Break" style:family="paragraph" style:parent-style-name="Standard"><style:paragraph-properties fo:margin-left="0pt" fo:margin-right="0pt" fo:margin-top="15.59pt" fo:margin-bottom="15.59pt" style:contextual-spacing="false" fo:text-align="center" style:justify-single-word="false" fo:text-indent="0pt" style:auto-text-indent="false"/></style:style></office:styles></office:meta>
Expected Output (Excerpt)
<office:meta>
<dc:title>Test ODF Header Insertion</dc:title>
<dc:creator>AmberHaelo</dc:creator>
<meta:user-definedmeta:name="customfield">If all we can do is insert XML into the office:meta element, we might as well just use custom metadata fields.</meta:user-defined>
</office:meta>
<office:styles>
<style:stylestyle:name="Scene_20_Break"style:display-name="Scene Break"style:family="paragraph"style:parent-style-name="Standard">
<style:paragraph-propertiesfo:margin-left="0pt"fo:margin-right="0pt"fo:margin-top="15.59pt"fo:margin-bottom="15.59pt"style:contextual-spacing="false"fo:text-align="center"style:justify-single-word="false"fo:text-indent="0pt"style:auto-text-indent="false"/>
</style:style>
</office:styles>
As noted in the sample text itself, the other problem with the output is that the field string is inserted directly into the office:meta element. This limits the usefulness of the ODF Header metadata field to inserting metadata, as I understand it, which we might as well do using the native support for adding custom fields.
I thus suggest that to resolve the current lack of utility with this field, the following two changes be made:
[BUG] XML escaping should be disabled for the value of the ODF Header field. As the MMD documentation notes, it is up to the user to make the string XML valid. It is as far as I can tell impossible to get around this problem currently.
[SUGGESTION] Move the insertion point of the string to occupy the line break following</office:meta>, so that the user is free to inject whatever form of document header material they desire. If they really wish to insert more metadata then it is a simple matter to re-open the element (as we demonstrate here, by re-opening the office:styles element---a practice that seems to work fine in my testing.
The text was updated successfully, but these errors were encountered:
Version: MultiMarkdown 6 v6.6.0
Problem Description: In attempting to insert a custom paragraph style into a document's FODT header, I found that the ODF Header metadata field, which is described in the documentation as being useful for such tasks, produces a result that cannot be validly inserted into the file, because all of the XML characters within the metadata value field are escaped, and the string is injected into a place that greatly reduces its utility.
Input
Output (Excerpt)
Expected Output (Excerpt)
As noted in the sample text itself, the other problem with the output is that the field string is inserted directly into the office:meta element. This limits the usefulness of the ODF Header metadata field to inserting metadata, as I understand it, which we might as well do using the native support for adding custom fields.
I thus suggest that to resolve the current lack of utility with this field, the following two changes be made:
</office:meta>
, so that the user is free to inject whatever form of document header material they desire. If they really wish to insert more metadata then it is a simple matter to re-open the element (as we demonstrate here, by re-opening the office:styles element---a practice that seems to work fine in my testing.The text was updated successfully, but these errors were encountered: