It’s true that there’s no trademark infringement when a name is used inside a work?
Not necessarily. Trademark infringement usually comes down to consumer confusion.
If a character in a book incidentally eats at McDonalds, that’s probably fine.
If your video game has McDonalds logos everywhere to the point that it looks like McDonalds paid for placement or sponsored the game in some way, that’s probably infringement.
The question a judge is going to ask is: “Were consumers led to believe that McDonalds endorsed this product?”
Trademarks protections exist to protect consumers as much as companies. They are they so you can trust that something labeled McDonalds is actually from the McDonalds you know.
Things like parody are considered fair use because people are assumed to be smart enough to understand that it’s parody and not the company doing something out of character.
Also, McDonald’s has deep pockets. If they don’t like how they are represented, it doesn’t matter if you’re correct legally.
Which is how they got their ass handed to them in the European Union when they went after Supermac’s and lost.
IANAL but I don’t think that’s true exactly. But if I remember correctly, there’s a fair use allowance for verbal use but not written use. You see it sometimes in things like a song that can say a brand name over and over, but they can’t name the song with the brand in the name.