Entry template category loop repeats URI when HTML added My entry template looks for the category of the entry 

{% for category in entry.productCategory %}
      {{ category.uri }}
{% endfor %}


This will output products/[category slug] as I intended. There is only one value in the loop.

As soon as I wrap the category URI in HTML like this:

{% for category in entry.productCategory %}
     &lt;a href="{{ category.uri }}"&gt;view&lt;/a&gt;
{% endfor %}


The URI doubles: eg the output is repeated so the template renders {{ category.uri }} as

products/[category slug]/products/[category slug]


Am I missing something in the loop / or Twig behaviour?
Using {{category.uri}} is likely just appending to the page's URL. You can use either {{category.url}} or {{siteUrl~category.uri}} to get the full URL.