I've had a prod around in this area and run a couple of tests, and I fear that you have found a bug I have raised this in Jira and already have a fix that I will apply to HEAD later today (it's very simple). I think it may actually be caused by a bug in the dom4j library that we use, but that's probably not relevant.So, the only suggestion I have to resolve this issue for you is to either wait for the next community release (which is likely to be made in August or September), take the source code for HEAD (or the next successful nightly build), or apply the fix yourself to your system (if you have and know how to build the source). If you decide to take from HEAD then I recommend you wait for a couple of weeks, as this is really quite volatile at the moment. If you decide to patch your copy of the code then the class you need to change is called "AssetSerializerXmlImpl" and the method is called "writeValue". In that method you will see this code snippet:
case text:
writer.startCDATA();
writer.write(value.toString());
writer.endCDATA();
break;
The fix is to alter that piece of code to read:
case text:
writer.write(new FlyweightCDATA(value.toString()));
break;
You will also need to add a corresponding import at the top of that class:
import org.dom4j.tree.FlyweightCDATA;
Sorry for the inconvenience, and thank you for asking your question here.