Are you actually using the
' style quotes, or did you only change that to make it show up on the forum? If you're using that, swap them out with the
` (backtick) style quotes and that should make it better. If you're trying to make it show up prettier on the forum, use 3 backticks to open and end a code block.
What you could look at is the quick update after saving the resource, to see how ContentBlocks rendered it into your content field. If that looks alright, which I hope it does, you may be running into restrictions of the MODX parser.
While it's not uncommon for people to use chunk tags in the templates like you are doing, that does come with the downside of nesting things quite deeply (especially if your chunk contains other chunks, and so on) and the MODX parser doesn't always deal nicely with that. In the 2.5 and 2.6 MODX releases there have been a couple of tweaks related to that. The characters you mention,
=&?, do fit with special characters in the parser.