I'm following up from #346 (closed), which covered my need of letting some (but not all) data: URLs in src attributes pass the sanitizer. What that PR did was piggyback on attribute filters to determine when a value should be allowed to bypass this logc that is otherwise unconditionally applied.
In that PR, @willkg said:
I suspect you can achieve what you're trying to achieve without making a substantial behavior change to Bleach.
Unless data: is added to the allowed_protocols (which seems risky), I don't see how this could be accomplished, but I would be happy to be educated.