This project is archived and is in readonly mode.

#1031 ✓resolved

Facebook XFBML Elements don't work in Element class

Reported by Bill | October 12th, 2010 @ 03:37 AM | in 1.3.1 (closed)

Facebook uses something called XFBML tags... they have a javascript library that parses your document and renders the tags out. For instance:
<fb:name capitalize="true" uid="4" linked="false" useyou="false"></fb:name>
should render as "Mark Zuckerberg"after being parsed, because Zuck's user ID is 4 on facebook.

MooTools's Element constructor doesn't let you create these because they have a colon in the tag name.
the problem is this line in Element:

if (!tag.test(/^[\w-]+$/)){

I changed the regex and now it works for me:

if (!tag.test(/^[:\w-]+$/)){

You may want to make the regex a little smarter, but there you go.

More about XFBML:

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Shared Ticket Bins

Referenced by