ignore any non-conformant elements or attributes on the incoming XML stream.
This is true for elements and attributes, but not for the values of defined attributes and the text content of defined elements. The reason for that is simply that you can't ignore those. For example, assume a bad behaving entity that sends messages with type 'furchtbar'.
<message to="someone@example.org" type="furchtbar"…>
<body>…</body>
</message>
How are servers supposed to route those?
Back to the 'show' element of presence stanzas. RFC 6121 § 4.7.2.1. clearly states that "The XML character data MUST be one of the following..".
I was wrong pointing you to the ejabberd developers. In the presence-show case, the server doesn't care about the content. He is free to not validate it, and just send it to the receiver. It's the entity where those stanzas *originating* from, that you need to fix.