FIX: Subfolder replace should only affect URL prefix (PR #12135)

GitHub

This pull request has been mentioned on Discourse Meta. There might be relevant details there:

Can you add a test for this?

Can you add a test for this?

I wasn’t able to reproduce the production bug in a test at first, but after you asked today managed to mimic the behavior with multiple calls.

In production we call this like 5 times with the same mutable input, so the new tests with two calls can reproduce the bug we had perfectly!

This pull request has been mentioned on Discourse Meta. There might be relevant details there: