I’ve made the last commit to get-url.js, some time after the linked one.
I agree links shouldn’t be rewritten if they’re user-entered, maybe getURL shouldn’t be called in these scenarios? I think getURL is supposed to be used for Discourse default routes to “convert” them to the subfolder setup, it has some tests explicitly expecting this subfolder prepending:
Please let me know if I can be of any help.