adding white-space: pre; to the CSS for foreignObject body would allow people to use newlines...
white-space: pre;
foreignObject body