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?
AI-generated summary
The discussion revolves around an issue where private topic links are not displayed as titles in certain contexts, unlike oneboxes. susaikum reports that when a topic in a private category links to another topic in the same category, the link appears as a URL instead of a title, unlike oneboxes which show previews. sam explains this is a security feature to prevent unauthorized users from accessing private information. susaikum acknowledges the security concern but seeks clarification on the difference between oneboxes and plain URL links. sam confirms it’s an oddity that needs fixing. dan proposes a PR to address this, but david cautions against fully oneboxing URLs with leading spaces, emphasizing existing safeguards. zogstrip notes that dan is aware and updating his PR to fix the issue by considering link context and refactoring the oneboxing logic.
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.
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.
Confirmed this is an oddity with the inline oneboxer that we should get fixed.
The following PR ensures that links with trailing spaces will be transformed to regular Oneboxes instead of inline Oneboxes:
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
Yes, @dan is already aware and working on updating his PR ![]()
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.
