I have a strange issue with the text component (core/wcm/components/text/v1/text) and a link to an internal page. When I add a link to the internal content, the host name is added to the link and saved in the repository, obviously causing a problem when publishing the page, since the link points to the author.
i'm working with AEM 184.108.40.206, fresh instance (i started the server on port 4505) and We.Retail site
Let me try to explain you the issue with some pics
Then i'm trying to add a text with hyperlink to internal content
In the image you can see the internal path is correct without hostname
But when i apply the changes and debug the code
the variable url has the correct value but the when the code save the attributes and get the href value from the child node the hostname is added
And that is the value that is saved to the repository as you can see in the next image
And then when i published that page, obviously the link is pointing to author. So i dont know the why text component (or jquery, or javascipt) is adding the hostname to the url.