Private topic links are not displayed as topic titles

Hi, I’d like to display topic links as titles.
When I post a topic inside a private category below,
The topic link which is in the same category was not displayed as title.
How do i fix it?

3 Likes

This is a security feature, it we need to be ultra careful about expansions here cause editors can then glean private information about topics they are not allowed to see.

5 Likes

Yes, I agree that hiding titles from unauthorized users.

I 'd like to know the difference from onebox.
For example, topic A and topic B are in the same private category.
The topic B shows the link of topic A.
When using a onebox, topic B showed preview of topic A with title.
When using a whitespace with topic A url, topic B showed just topic A url.

1 Like

Confirmed this is an oddity with the inline oneboxer that we should get fixed.

4 Likes

The following PR ensures that links with trailing spaces will be transformed to regular Oneboxes instead of inline Oneboxes:

FIX: Onebox URLs which have leading spaces by udan11 · Pull Request #8893 · discourse/discourse · GitHub

4 Likes

I don’t think we want to fully onebox URLs with leading spaces? Quite a lot of effort was put into making sure that leading spaces prevent oneboxing:

I think inline-oneboxing is correct, but we need to fix the inline oneboxer so that it works cross-category in the same way as the regular onebox

5 Likes

Yes, @udan11 is already aware and working on updating his PR :wink:

5 Likes

The problem here was caused by the fact that InlineOneboxer does not take into consideration the context of the link (i.e. topic’s category). I refactored Oneboxer to expose the same method used to get the Topic object, but in the long term we should be combining the two classes and have an inline: option.

7 Likes