Don’t normalize the text of a tag that is displayed, only normalize the content for a tag in the URL

This commit is contained in:
Jonny Barnes 2018-01-06 20:06:19 +00:00
parent 7e626ac4e7
commit 53875f08eb
2 changed files with 5 additions and 1 deletions

View file

@ -456,7 +456,7 @@ class Note extends Model
function ($matches) { function ($matches) {
return '<a rel="tag" class="p-category" href="/notes/tagged/' return '<a rel="tag" class="p-category" href="/notes/tagged/'
. Tag::normalize($matches[1]) . '">#' . Tag::normalize($matches[1]) . '">#'
. Tag::normalize($matches[1]) . '</a>'; . $matches[1] . '</a>';
}, },
$text $text
); );

View file

@ -109,5 +109,9 @@ class NotesTableSeeder extends Seeder
$mediaInstagram->type = 'image'; $mediaInstagram->type = 'image';
$mediaInstagram->save(); $mediaInstagram->save();
$noteFromInstagram->media()->save($mediaInstagram); $noteFromInstagram->media()->save($mediaInstagram);
sleep(1);
$noteCapitalHashtag = Note::create([
'note' => 'A #TwoWord hashtag',
]);
} }
} }