mirror of
https://github.com/flarum/core.git
synced 2025-07-28 20:20:34 +02:00
Don't use hash in generated mention URLs
This commit is contained in:
@@ -17,7 +17,8 @@ class PostMentionsFormatter extends FormatterAbstract
|
||||
if ($post) {
|
||||
$text = $this->ignoreTags($text, ['a', 'code', 'pre'], function ($text) use ($post) {
|
||||
return $this->parser->replace($text, function ($match) use ($post) {
|
||||
return '<a href="#/d/'.$post->discussion_id.'/-/'.$match['number'].'" class="mention-post" data-number="'.$match['number'].'">'.$match['username'].'</a>';
|
||||
// TODO: use URL generator
|
||||
return '<a href="/d/'.$post->discussion_id.'/-/'.$match['number'].'" class="mention-post" data-number="'.$match['number'].'">'.$match['username'].'</a>';
|
||||
}, $text);
|
||||
});
|
||||
}
|
||||
|
@@ -16,7 +16,8 @@ class UserMentionsFormatter extends FormatterAbstract
|
||||
{
|
||||
$text = $this->ignoreTags($text, ['a', 'code', 'pre'], function ($text) {
|
||||
return $this->parser->replace($text, function ($match) {
|
||||
return '<a href="#/u/'.$match['username'].'" class="mention-user" data-user="'.$match['username'].'">'.$match['username'].'</a>';
|
||||
// TODO: use URL generator
|
||||
return '<a href="/u/'.$match['username'].'" class="mention-user" data-user="'.$match['username'].'">'.$match['username'].'</a>';
|
||||
}, $text);
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user