We altered our component to add the $URL_PREFIX if it doesn't exist.
There is a known issue where TinyMCE prepends hostname to image URL's. If happens when you try to insert an image using TinyMCE. You would get the window and fill in the URL manually instead of browsing (ie. /htdocs/images/test.gif). When you click "OK" and then look at the resulting html source, it prepends the hostname. You can also see this if you view source of the .page file. Is this the same issue ?