Using non-ascii characters in tags is not working #3033

Closed
opened 2025-12-29 18:24:56 +01:00 by adam · 1 comment
Owner

Originally created by @liisberg on GitHub (Nov 25, 2019).

Environment

  • Python version: 3.6.8
  • NetBox version: 2.5.3

Steps to Reproduce

  1. Add a tag to a prefix containing an non-ascii character.
    Attachment 1: image
  2. The tag is added correctly and represented correctly in the UI. See attachment 1.
  3. Non-ascii characters is removed from the tag when the URL is represented.
    Attachment 2:
    image

Expected Behavior

The expected behavior is that characters would not be present in URL (../ipam/prefixes/?tag=) when filtering with non-ascii characters, as they are not valid in an URL. However, searching for the tag should return the prefix(es) assign to the tag.

Observed Behavior

Searching for an assigned tag including an non-ascii character does not yield any results. However, using the slug value, which does not contain non-ascii characters, the prefix(es) returned is correct.

Using the API it should be possible to filter by the full tag including non-ascii characters, since it is correctly represented:
{ "id": 12, "name": "höst", "slug": "host", "tagged_items": 1 },

Originally created by @liisberg on GitHub (Nov 25, 2019). ### Environment * Python version: 3.6.8 <!-- Example: 3.5.4 --> * NetBox version: 2.5.3 <!-- Example: 2.5.2 --> <!-- Describe in detail the exact steps that someone else can take to reproduce this bug using the current stable release of NetBox (or the current beta release where applicable). Begin with the creation of any necessary database objects and call out every operation being performed explicitly. If reporting a bug in the REST API, be sure to reconstruct the raw HTTP request(s) being made: Don't rely on a wrapper like pynetbox. --> ### Steps to Reproduce 1. Add a tag to a prefix containing an non-ascii character. Attachment 1: ![image](https://user-images.githubusercontent.com/2950767/69541004-643e6100-0f88-11ea-92e6-72b035574d6d.png) 2. The tag is added correctly and represented correctly in the UI. See attachment 1. 3. Non-ascii characters is removed from the tag when the URL is represented. Attachment 2: ![image](https://user-images.githubusercontent.com/2950767/69541123-b7b0af00-0f88-11ea-8120-ae90635415a9.png) <!-- What did you expect to happen? --> ### Expected Behavior The expected behavior is that characters would not be present in URL (../ipam/prefixes/?tag=<tag>) when filtering with non-ascii characters, as they are not valid in an URL. However, searching for the tag should return the prefix(es) assign to the tag. <!-- What happened instead? --> ### Observed Behavior Searching for an assigned tag including an non-ascii character does not yield any results. However, using the slug value, which does not contain non-ascii characters, the prefix(es) returned is correct. Using the API it should be possible to filter by the full tag including non-ascii characters, since it is correctly represented: ` { "id": 12, "name": "höst", "slug": "host", "tagged_items": 1 }, `
adam closed this issue 2025-12-29 18:24:56 +01:00
Author
Owner

@jeremystretch commented on GitHub (Nov 25, 2019):

This is intended behavior. Tags are referenced by their slug values.

@jeremystretch commented on GitHub (Nov 25, 2019): This is intended behavior. Tags are referenced by their slug values.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#3033