Oneboxing not working when starting a topic with pre-filled information

The documentation on Create a link to start a new topic with pre-filled information says:

However, even when directly copy-pasting the listed example, a redirect appears to strip one of the slashes from the URL specified after title= , resulting in the browser instead navigating to https://meta.discourse.org/new-topic?title=https:/www.xkcd.com/556 which opens a composer window for a new topic with the pre-filled title https:/www.xkcd.com/556. The behavior and oneboxing described in Start a topic by pasting a link (like Reddit) then obviously doesn’t occur, unless you manually add another / back in to the title URL.

I first saw this behavior trying things out on my hosted Discourse and figured I might have something mis-configured, but then seems like a bug since it also happens with the provided example?

1 Like

IMO you are expected to encode any query unsafe query params,

so

https://meta.discourse.org/new-topic?title=https://www.xkcd.com/556

becomes

https://meta.discourse.org/new-topic?title=https%3A%2F%2Fwww.xkcd.com%2F556

that works like Discourse Meta (open in a new tab)

4 Likes

ah! thank you, I would suggest the example be clarified but can proceed from here. Much appreciated!

4 Likes

I’ve added this info on the guide, thanks! :handshake:

2 Likes