Replace %u variables in extension code