Search code examples
azureblobhref

Azure hosted blob of type .html intermittently ignoring absolute href and making relative


I have created an html file on Azure blob storage. Accessing the file through a browser works flawlessly, every time. However, for some reason, despite two links being formatted exactly the same (except for the href and the img src), Azure is treating one as a relative link and the other as an absolute link.

I have tried to reformat the links. I have tried to reposition the failing element within the page. I have tried to use different links (such as test.com)

<a href="https://linkedin.com/company/xyz" target="_blank"><img src="xyz"></a>
<a href="https://twitter.com/xyz" target="_blank"><img src="abc"></a>

The top link works correctly as an absolute URL. The second link is treated as relative, appending the https:// to the end of my azure blob storage path.

The view source of blob storage pages is infinitely more complex than the page itself. Is it possible that something is running that is interfering with simple html code? Is there a different code structure I should use? Thanks in advance.


Solution

  • It turns out that when copying links from Gmail to the Azure editor, it allowed for hidden characters which were saved and preventing links from working properly.