Disable onebox for specific links

onebox

(Nils Hjelte) #1

Is it possible to disable onebox for specific links in a post? Sometimes I only want the link, and not the onebox inlining.


(Ben) #2

Just do this:
[Example](https://en.wikipedia.org/wiki/Example)

Shows as:
Example

You can change the ‘example’ text to anything else.

You can also put something before or after it (on the same line). I used “& #00;” with no spaces or quotes. It’s an used character in html.
Example - Wikipedia


(Dean Taylor) #3

Just put a space before it.

##Before

##After
Example - Wikipedia

##More detail
See the content of this raw post here: https://meta.discourse.org/raw/25683/3/


(Peter) #4

I would also disable this per default and e.g. enable it per user to avoid tracking forum users from external sites.

Is that currently possible via an option? I can only find settings->onebox but setting the domain whitelist e.g. to only my own domain or using maxlength=1 does not seem to block e.g. google maps from loading.


(Kane York) #5

It is not currently feasible to disable certain embeds for certain users.

It is not currently configurable to disable certain embeds for certain sites. (i.e. this could be added)


(Peter) #6

Thanks this sounds good. For me the whitelist feature would already be sufficient, if it would work as expected :slight_smile: or maybe I misunderstood the intend of it (?)


#7

Since I have a private instance of discourse, onebox doesn’t work. Every onebox just shows my forum root URL.

So +1 for the ability to disable it entirely (my apologies if this is already somewhere in core.)


How to disable onebox and perhaps add a custom class to a link?
(Jeff Atwood) #8

you mean self onebox does not work. Onebox of external sites works fine.