Thread:User talk:CodeCat/Module:ny-IPA/reply (3)

Just a hunch but, did you normalise the text to NFC before returning it? This combines diacritics with the characters before them, when possible. I found that while MediaWiki does this to the page content when you save a page, Lua doesn't do it.