fix(routing): keep the trailing slash when stripping an injected .html (#17742)