typoLink() always creates absolute links when using more than one domain records
... and using another domain than the first in the list of domain records
... and using config.typolinkCheckRootline = 1
That means, if you have more than one domain records in one page like
and you call the page with "http://green.my-domain.com", all links will be generated as absolute links with the domain blue.my-domain.com:
That's a major problem, if you use different domains or sub-domains for a different behaviour of the website, like different colors, different languages, local testing, .... You'll never stay in the domain you called, when clicking just on one link...
This bug is related to #19149, because I think resolving that bug introduced this one :-).
Patch is attached, but did only a quick-check with nested domains.
(issue imported from #M13903)