fix: fix case sensitivity in hashtag links (#1478)

fixes #1477
This commit is contained in:
Nolan Lawson 2019-09-13 19:04:22 -07:00 committed by GitHub
parent cdb99cbe78
commit 2112361fef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -121,7 +121,7 @@
// hydrate hashtag // hydrate hashtag
if (tags && anchor.classList.contains('hashtag')) { if (tags && anchor.classList.contains('hashtag')) {
for (const tag of tags) { for (const tag of tags) {
if (anchor.getAttribute('href').endsWith(`/tags/${tag.name}`)) { if (anchor.getAttribute('href').toLowerCase().endsWith(`/tags/${tag.name.toLowerCase()}`)) {
anchor.setAttribute('href', `/tags/${tag.name}`) anchor.setAttribute('href', `/tags/${tag.name}`)
anchor.setAttribute('id', `status-content-link-${uuid}-${++count}`) anchor.setAttribute('id', `status-content-link-${uuid}-${++count}`)
anchor.removeAttribute('target') anchor.removeAttribute('target')