Fix links to topics with empty slug because they use non-ascii titles
This commit is contained in:
parent
0cd7c592ec
commit
2c516400de
|
@ -75,6 +75,8 @@ Discourse.Utilities = {
|
|||
url = Discourse.getURL("/t/");
|
||||
if (slug) {
|
||||
url += slug + "/";
|
||||
} else {
|
||||
url += 'topic/';
|
||||
}
|
||||
url += topicId;
|
||||
if (postNumber > 1) {
|
||||
|
|
|
@ -14,10 +14,8 @@ Discourse.Notification = Discourse.Model.extend({
|
|||
}).property('read'),
|
||||
|
||||
url: (function() {
|
||||
var slug;
|
||||
if (this.blank('data.topic_title')) return "";
|
||||
slug = this.get('slug');
|
||||
return Discourse.getURL("/t/") + slug + "/" + (this.get('topic_id')) + "/" + (this.get('post_number'));
|
||||
return Discourse.Utilities.postUrl(this.get('slug'), this.get('topic_id'), this.get('post_number'));
|
||||
}).property(),
|
||||
|
||||
rendered: (function() {
|
||||
|
|
Loading…
Reference in New Issue