mirror of
https://github.com/discourse/discourse.git
synced 2025-02-21 01:40:40 +08:00
UX: lowercase tag name before checking it with topic title.
Tag names can contain uppercase letters if `force_lowercase_tags` site setting disabled.
This commit is contained in:
parent
66976baefa
commit
62f4fc728d
@ -165,11 +165,11 @@ const Topic = RestModel.extend({
|
||||
return tags;
|
||||
}
|
||||
|
||||
const title = this.title;
|
||||
const title = this.title.toLowerCase();
|
||||
const newTags = [];
|
||||
|
||||
tags.forEach(function(tag) {
|
||||
if (title.toLowerCase().indexOf(tag) === -1) {
|
||||
if (title.indexOf(tag.toLowerCase()) === -1) {
|
||||
newTags.push(tag);
|
||||
}
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user