This is really only a concern if you are an exit node, which is not something that people are encouraged to do without experience and measures in place to knowingly protect themselves.
If you are just a relay, the content is encrypted and your chances of liability are low. Same goes if you are promoted to a guard node.