I’ve sent a possible fix at Fix/wikipedia oneboxing with url encoded hash by jbalsas · Pull Request #14015 · discourse/discourse · GitHub</titl.
I think unescaping the m_url_hash_name
should be enough to cover all cases.
Hope this is the right process to contribute!