Making finalReplace and transformHTML available to plugins