Embeded YouTube will not display in Forum thread

This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.

Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.

This is the place to report bugs and get support

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum.
This thread is closed to new posts. You must sign in to post in the forums.
3/11/2010 3:36:01 PM
Gravatar
Total Posts 1

Embeded YouTube will not display in Forum thread

I am having trouble with embedding youtube videos onto forum threads. I have tried each editor and am currently using tinymce, but none work. I have tried using youtube's embedded code and pasting it directly into the html or source code, but to no avail. I have also used the movie feature on tinymce, but it won't work either. The odd thing is that it will show the video in the preview screen, and it will display if I emed it in a new topic, but not a thread! I am running windows server 2003 r2, mssql 2008 express, and the latest mojoportal version 2.3.3.9. I'm at my wits end here...am I missing a setting somewhere??? Thanks in advance for any help that can be provided!!

3/12/2010 12:18:05 PM
Gravatar
Total Posts 18439

Re: Embeded YouTube will not display in Forum thread

Hi,

The forums allows any user to post, as such the content posted is un trusted and we use NeatHtml to prevent potentially malicious content posted by the user from being displayed. Videos fall into that category of untrusted content, letting untrusted users post video would be a bad idea. I have never seen a forum where users were allowed to embed video.

This is not a bug but a feature to keep your site secure.

Hope it helps,

Joe

3/12/2011 5:38:02 AM
Gravatar
Total Posts 125

Re: Embeded YouTube will not display in Forum thread

Joe hi,

 

I hope that post of yours above is a mistake. Most forum applications support Youtube embeded in posts.

 

3/12/2011 7:29:04 AM
Gravatar
Total Posts 18439

Re: Embeded YouTube will not display in Forum thread

I use a lot of forums and I'm not aware of any of them allowing users to embed videos. stackoverflow doesn't allow it, asp.net forums does not allow it, I really cannot think of a single forum I visit that allows it though I'm sure there are some niche kind of forums out there that might depend on it, but I don't see it as a typical forum feature.

There are security risks anytime you let users embed Flash the same as if you let them embed javascript, just because you can do something does not mean you should. It opens up attack surface for XSS.

Videos in forum posts seems like a niche kind of forum, maybe some forum applications make it possible, but doing it securely is challenging. The safest way to do it is to not use html but instead something like markdown where the html is created server side from the markdown and is constrained by rules. But this makes the editor less friendly and still would require a lot of work to support youtube vimeo and whatever list of things one decides to allow.

Right now the mojoPortal forums are basic and not targeting specialty niche use cases but just providing basic forums.

I will make it so that NeatHtml is not used (which blocks youtube and javascript) if the user is marked as trusted. This will allow moderators, ie users with edit permissions on the page or forums instance to be able to embed video. 

Maybe YAF supports it, and that might also be an option for use with mojoPortal at some point.

Best,

Joe

3/12/2011 7:39:23 AM
Gravatar
Total Posts 125

Re: Embeded YouTube will not display in Forum thread

Joe,

You are allowing Youtube videos in blog posts, right ? What is the difference ?

I see a lot of php forums to fully allow Youtube. Also Youtube has a new way to embed videos, an iframe way. Is that also dangerous ?

YAF allows it yes, most NET portals do not, you are right about it.

Thanks

 

 

Costas

3/12/2011 7:45:43 AM
Gravatar
Total Posts 18439

Re: Embeded YouTube will not display in Forum thread

Only trusted users can use content features like blogs and html content so they allow a lot of things. But strangers can use the forums and should not be allowed to do such things. You should not let strangers have editing power on blogs either.

See "What mojoPortal is NOT Designed for" in the About page.

http://www.mojoportal.com/about.aspx

Best,

Joe

3/12/2011 7:46:25 AM
Gravatar
Total Posts 18439

Re: Embeded YouTube will not display in Forum thread

yes iframes are also dangerous.

3/12/2011 7:52:05 AM
Gravatar
Total Posts 18439

Re: Embeded YouTube will not display in Forum thread

It can be made mostly safe with embed tags and limiting the html but it is tricky to manage allowing it without also letting other things slip through.

The simplest approach is to not use html but some other markup language then have special codes that are replaced by html, including special codes for youtube videos so that only server code can create the embed tag. But then users have to learn whatever lightweight markup you use instead of html, and typically one doers not use a wysiwyg with other markup languages but special editors designed for the markup language. I don't really want to make that change at this time, though maybe someday I will implement it as an option to use markdown in the forums.

Best,

Joe

 

3/12/2011 8:10:41 AM
Gravatar
Total Posts 125

Re: Embeded YouTube will not display in Forum thread

You mean like BB code or something, like for example:

 

[youtube]http://www.blah.com/movie.ext[/youtube]

 

 

3/12/2011 8:16:52 AM
Gravatar
Total Posts 18439

Re: Embeded YouTube will not display in Forum thread

yes, exactly BB Code or markdown are both viable options and then server side code must transform that into html and embed tags for display.

You must sign in to post in the forums. This thread is closed to new posts.