Hello,
Thanks for sending the sample that illustrates the issue. The current version of BulkProcessing doesn't apply htmlspecialchars to the new contents automatically (other methods of phpdocx apply this function automatically), so the strings that contains & don't appear, you can solve it applying htmlspecialchars to the contents to be added:
$bulk->replaceText(
[
["PLACEHOLDER" => htmlspecialchars("test & test")],
["PLACEHOLDER" => htmlspecialchars("test&")],
["PLACEHOLDER" => htmlspecialchars("&")],
["PLACEHOLDER" => "test test"]
]
);
$documents = $bulk->getDocuments();
We have opened a task to apply htmlspecialchars automatically in the next version of BulkProcessing class.
Regards.