Skip to content

Normalize Topic Slug #1

@Alteras1

Description

@Alteras1

Currently, topics using purely non-ASCII characters as the title will have no slug (when in ascii slug generation mode). This will cause a redirect loop when attempting to access the topic externally. Also they don't look nice.

Likely solution:
Either apply a unicode_normalize or some kind of transliterate function to the title.

Relevant links
https://github.com/discourse/discourse/blob/1f11aeab6b7c3c9e751e7499f1060f7436763789/app/models/topic.rb#L1396-L1404
https://github.com/discourse/discourse/blob/main/lib/slug.rb#L44-L46

https://apidock.com/ruby/String/unicode_normalize
https://github.com/anyascii/anyascii

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions