PDA

View Full Version : BBCode for embedded tweets



Lilaena De'Ville
May 1st, 2014, 03:42:38 PM
Whatever code it is Twitter generates for embedding into websites, it doesn't work on our site. But I found this...?

https://www.vbulletin.org/forum/showthread.php?t=289282

Which could solve the problem.

Here is where Twitter talks about embedding code: https://support.twitter.com/articles/20169559-embedding-a-tweet-on-your-website-or-blog#

This is what that looks like:

<blockquote class="twitter-tweet" lang="en"><p>May the Chapter VII be with you...always. Or at least until 2015. I love you....you know. <a href="http://t.co/MfbfwRIdJP">http://t.co/MfbfwRIdJP</a></p>&mdash; Carrie Fisher (@carrieffisher) <a href="https://twitter.com/carrieffisher/statuses/461634069768728576">April 30, 2014</a></blockquote>
******** async src="//platform.twitter.com/widgets.js" charset="utf-8">***********

and then:

May the Chapter VII be with you...always. Or at least until 2015. I love you....you know. http://t.co/MfbfwRIdJP
— Carrie Fisher (@carrieffisher) April 30, 2014 (https://twitter.com/carrieffisher/statuses/461634069768728576)
******** async src="//platform.twitter.com/widgets.js" charset="utf-8">***********

TheHolo.Net
May 1st, 2014, 03:47:43 PM
See those asterisks? That means its censored HTML. This will have the same problem as the SoundCloud embed did. We either disable HTML in all posts and remove the censored HTML we have specified, or we do not do the embed. The vB.org mod isn't going to help since it still uses the censored HTML.

Lilaena De'Ville
May 1st, 2014, 03:50:54 PM
So, why can't we do that?

TheHolo.Net
May 1st, 2014, 03:53:53 PM
I know for certain that there are a high number of posts in our database, either in active forums or in archives, that include HTML, disabling it will make those posts nearly unreadable/unusable. There are probably other reasons as well that are not coming to me immediately.

Since our inception on vB, and even before that, on ezboard, we have always allowed HTML, with some creative restrictions for security purposes.

Lilaena De'Ville
May 1st, 2014, 03:58:01 PM
Ok, well, I don't understand why we would have to disable HTML in order to use it. You can disable it in a post with a click of a button, so is it as easy as that? Disable HTML for the post and then it will work? (as pasted from Twitter, not the board hack thing)


<blockquote class="twitter-tweet" lang="en"><p>May the Chapter VII be with you...always. Or at least until 2015. I love you....you know. <a href="http://t.co/MfbfwRIdJP">http://t.co/MfbfwRIdJP</a></p>&mdash; Carrie Fisher (@carrieffisher) <a href="https://twitter.com/carrieffisher/statuses/461634069768728576">April 30, 2014</a></blockquote>
******** async src="//platform.twitter.com/widgets.js" charset="utf-8">***********

edit: nope

TheHolo.Net
May 1st, 2014, 04:34:16 PM
I have a few ideas to try, but it will take some time and experimentation. I may be able to either exclude bbcode from the censor, or use the phrase manager to censor bad HTML tags while allowing it in bbcode. I will research further and if I find a solution, short of disabling HTML site wide, I will implement it.

My old creative solution for allowing HTML needs to get more creative. Kinda sad, it has worked for us for 15+ years now.

Lilaena De'Ville
May 1st, 2014, 04:37:45 PM
Ok, cool. :) Thanks!

I think 15 years in computer years makes it a dinosaur. ;)