In LaTex, '&' and '\' are command chars. So they have to be escaped.
The sample:
class SomeClass{
Something & something other with a \\ does not work
}
throws an latex exception caused by the & and the \ just disappears.
Both should get an '\' prefixed to escape it so that they are generated as "\&" and "\\".
The bug is propably on every text regardless of what diagram type or element.