{% if deleted %}
    <at:deleted-entry ref="{{entry_id}}" when="{{deleted}}"/>
{% else %}
    <entry>
        <id>{{entry_id}}</id>
        <updated>{{updated}}</updated>
        <published>{{published}}</published>
        <title>{{title}}</title>
        <summary>{{summary|default_if_none:""}}</summary>
        <content src="{{content_src|safe}}"
            type="application/pdf"
            le:md5="{{content_md5}}"/>
        <link rel="alternate"
            href="{{rdf_href}}"
            type="application/rdf+xml"
            length="{{rdf_length}}" le:md5="{{rdf_md5}}"/>
        {% for bilaga in foreskrift.bilagor.all %}
        <link rel="enclosure"
            href="{{bilaga.file.url|safe}}"
            type="application/pdf"
            dct:isFormatOf="{{bilaga.get_rinfo_uri}}"
            length="{{bilaga.file.data.size}}" le:md5="{{bilaga.file_md5}}"/>
        {% endfor %}
        {% for dok in foreskrift.ovriga_dokument.all %}
        <link rel="enclosure"
            href="{{dok.file.url|safe}}"
            type="application/pdf"
            length="{{dok.file.data.size}}" le:md5="{{dok.file_md5}}"/>
        {% endfor %}
    </entry>
{% endif %}

{% if deleted %}
    <at:deleted-entry ref="{{entry_id}}" when="{{deleted}}"/>
{% else %}
    <entry>
        <id>{{entry_id}}</id>
        <updated>{{updated}}</updated>
        <published>{{published}}</published>
        <title>{{title}}</title>
        <summary>{{summary|default_if_none:""}}</summary>
        <content src="{{content_src|safe}}"
            type="application/pdf"
            le:md5="{{content_md5}}"/>
        <link rel="alternate"
            href="{{rdf_href}}"
            type="application/rdf+xml"
            length="{{rdf_length}}" le:md5="{{rdf_md5}}"/>
        {% for bilaga in foreskrift.bilagor.all %}
        <link rel="enclosure"
            href="/{{bilaga.file.url|safe}}"
            type="application/pdf"
            dct:isFormatOf="{{bilaga.get_rinfo_uri}}"
            length="{{bilaga.file.data.size}}" le:md5="{{bilaga.file_md5}}"/>
        {% endfor %}
        {% for dok in foreskrift.ovriga_dokument.all %}
        <link rel="enclosure"
            href="/{{dok.file.url|safe}}"
            type="application/pdf"
            length="{{dok.file.data.size}}" le:md5="{{dok.file_md5}}"/>
        {% endfor %}
    </entry>
{% endif %}

Add leading slash to enclosure uri:s
Add leading slash to enclosure uri:s
