# Taxonomy terms ending in periods behave inconsistently

**URL:** <https://discourse.gohugo.io/t/taxonomy-terms-ending-in-periods-behave-inconsistently/36114>\
**Category:** support\
**Tags:** taxonomy\
**Created:** [December 18, 2021, 8:40pm UTC](https://discourse.gohugo.io/t/taxonomy-terms-ending-in-periods-behave-inconsistently/36114 "2021-12-18T20:40:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![danurman](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/danurman/32/15831_2.png) [@danurman](https://discourse.gohugo.io/u/danurman)\
**Post date:** [December 18, 2021, 8:40pm UTC](https://discourse.gohugo.io/t/taxonomy-terms-ending-in-periods-behave-inconsistently/36114/1 "2021-12-18T20:40:38Z")

</div>

First observed in Hugo extended 0.83.1, reproduced in Hugo extended 0.91.0. Output of `hugo env`:

```auto
hugo v0.91.0-D1DC0E9A+extended linux/amd64 BuildDate=2021-12-17T09:50:20Z VendorInfo=gohugoio
GOOS="linux"
GOARCH="amd64"
GOVERSION="go1.17.5"

```

When a taxonomy term _ends_ in a period (and maybe other punctuation?) it behaves inconsistently. (Periods _within_ the term are fine.)

Specifically, I’ve observed the following:

1. Within each page that has an affected taxonomy term, the term is found within the page’s `.params`. (As expected.)
2. Within the taxonomy page’s `.Pages`, the affected term’s page is found. (As expected.)
3. A `.Site.GetPage` call with the path to an affected term’s page does not return the page, but instead a `nopPage`. (Not expected.) (Similar calls to other terms in the same taxonomy return the term’s page as expected.)
4. Navigating through `.Site.Taxonomies` or the term page’s `.Pages` for pages with the affected term does not find all of them - in my below repro, the Home page is found while the regular page is not despite them both having the affected terms. (Not expected.) (For other terms, both pages are found.)

My minimal repro is a fresh site from `hugo new site` with the following added:

* * *

`content/_index.md`

```auto
---
title: "Home"
categories: ["Normal", "Period.middle", "Periodend."]
tags: ["Normal", "Period.middle", "Periodend."]
---

```

* * *

`content/page/item.md`

```auto
---
title: "Item"
categories: ["Normal", "Period.middle", "Periodend."]
tags: ["Normal", "Period.middle", "Periodend."]
---

```

* * *

`layouts/index.html` and `layouts/_default/single.html`

```auto
<html>
<body>
<h1>{{ .Title }}</h1>

<h2>This page's categories:</h2>
<ul>
  {{- range .Params.categories }}
  <li>{{ . }} {{ with $.Site.GetPage (print "/categories/" (urlize .)) }} <a href="{{ .Permalink }}">(Page)</a>{{ end }}</li>
  {{- end }}
</ul>

<h2>This page's tags:</h2>
<ul>
  {{- range .Params.tags }}
  <li>{{ . }} {{ with $.Site.GetPage (print "/tags/" (urlize .)) }} <a href="{{ .Permalink }}">(Page)</a>{{ end }}</li>
  {{- end }}
</ul>

<h2>Site taxonomies:</h2>
<ul>
  {{- range $taxonomyname, $taxonomy := .Site.Taxonomies }}
  <li>{{ title $taxonomyname }} ({{ len $taxonomy }}):
    <ul>
      {{- range $taxonomy }}
      <li><a href="{{ .Page.Permalink }}">{{ .Page.Title }} ({{ .Count }})</a></li>
      {{- end }}
    </ul>
  </li>
  {{- end }}
</ul>

</body>
</html>

```

* * *

`layouts/_default/list.html`

```auto
<h1>{{ .Title }}</h1>
<ul>
{{- range .Pages.ByTitle }}
  <li><a href="{{ .Permalink }}">{{ .Title }}</a></li>
{{- end }}
</ul>

```

* * *

This is a home page and a regular page that both have tags and categories of `["Normal", "Period.middle", "Periodend."]`. Each page lists its own tags and categories and those of the site. For both, it shows all three tags/categories (but fails to link to the page for “Periodend.” because the `.GetPage` call returned a `nopPage`). They also show all three tags/categories for the site, but “Periodend.” only has a count of “1” because only the regular page is counted.
