Plaintext MUST be sanitized before being passed into the Docx Generator node(s), which they don't warn you about (since un-sanitized greater-than, less-than, and ampersand symbols *will BREAK* the generated word file). I tend to encapsulate the following logic into an expression rule which will then be used to sanitize any text (at least any where there's any variability beyond what you're sure will be safe).
/* RULE_wordDocxParagraphFormatter */
a!localVariables(
local!characters: {
"&",
">",
"<",
char(10),
char(13)
}, /* NOTE: the ordering of these is important. */
local!replacements: {
tohtml("&"),
tohtml(">"),
tohtml("<"),
rule!RULE_insertWordLineBreak(), /* returns "" */
""
},
reduce(
fn!substitute,
trim(ri!input),
a!forEach(
local!characters,
{
fv!item,
local!replacements[fv!index]
}
)
)
)