Skip to content

Pound symbol '#' not displayed properly in post tags and categories #2156

Closed
@deadlydog

Description

Environment

Expected behavior

When creating a post and using a tag or category with a # in it, the tag/category does not get displayed properly on the post; instead just an empty box is displayed.

For an example, see the tags and categories on this page, which uses .Net and C# as a tag and category. .Net shows up fine, but C# ends up just being an small empty box.

image

I believe the issue is caused by the parsing of the tags/categories and splitting on the # sign.

The tag does show up properly in the tags and categories pages; just not on the posts themselves.

Steps to reproduce the behavior

Simply include a # in your tag or category name on a post. I've tried escaping the # as well as wrapping it in quotes, but nothing seems to work.

e.g. Here's a post with front matter that reproduces the issue.

title: 'Sweet C# Gems'
permalink: /sweet-c-gems/
categories:
  - .NET
  - C#
tags:
  - .NET
  - C#

Thank you for providing this outstanding theme!

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions