user-pic

Limit HTML Tags: Buncha Custom Jazz

Vote 0 Votes

So I want to allow users in one of my MT forums to embed videos. This means I have to tweak the Limit HTML Tags setting to include my own stuff.

Embedding a video requires object, param, and embed tags. It also requires several custom attributes: width, height, name, value, src, type, allowfullscreen, and allowscriptaccess.

Here’s what I put in the custom setting field:

a href,b,i,br/,p,strong,em,ul,ol,li,blockquote,pre,embed,object,param,* width,* height, * name, * value,* src,* type,* allowfullscreen,* allowscriptaccess

…but it doesn’t work. Can anyone see what I’m doing wrong?

Thanks!

Reported on Movable Type 4.2

9 Replies

| Add a Reply
  • What happens?

    Aren't width, height, name etc attributes not tags.

  • Based on the fact that "a href" is listed, I bet you need to list "object width," "object height, "param name," etc. I don't see anything that indicates you can enter a wildcard like "*."

  • I'm following the syntax rules [described here](http://www.sixapart.com/movabletype/docs/3.3/d_configuration_directives/globalsanitizespec.html). That's where I got the idea for the wild card use with the attributes.

    The result of what I've attempted is the video embed code simply doesn't show up (taken straight from [Vimeo](http://vimeo.com)).

  • Investigating a little by trying it, I do indeed see that the asterisk isn't being noted as a wildcard.

    It doesn't actually work that way (look at the HTML output of a comment), nor does Sanitize.pm appear to deal with tags defined as such (well, the sanitization process deals with them correctly, but it doesn't get that far because parse_spec never adds wildcard attributes to the wildcard key).

    Even looking at MT3, I don't think this ever worked. I submitted a bug report for this (http://bugs.movabletype.org/default.asp?86966).

  • Thanks, Dan.

    I initially tried just using *only* the tags I needed, and when that didn't work, I figured I needed to add custom attributes.

    In the meantime, I'm using:

    It sort of makes me nervous to leave things wide open like that, but oh well. :)

  • Including "object width," "object height," etc should work. No?

  • I'm using this:

    **a href,b,i,br/,p,strong,em,ul,ol,li,blockquote,pre,embed,object,param,object width,object height,param name,param value,embed src,embed type,embed allowfullscreen,embed allowscriptaccess,embed width,embed height**

    ...and it doesn't work.

  • default userpic

    I used this as my allowed HTML and got embeds to work:

    a href,b,i,br/,p,strong,em,ul,ol,li,blockquote,pre,object width height,param name value,embed src type allowscriptaccess allowfullscreen

  • I'll give that a try. Thanks, Lisa!

Add a Reply

If you need to share template code, replace all the "<" signs with "&lt;" or use this utility.

Forum Groups

1773 6162

Last Topic: Excluding categories from blog by kholechek on Feb 9, 2012

86 302

Last Topic: website entries by masoud on Oct 26, 2011

1429 5077

Last Topic: What apocalypse hit this community in the middle of 2011? by 75th on Feb 10, 2012

695 2910

Last Topic: Insert Image / File Fails by Russ Miller on Feb 10, 2012

84 291

Last Topic: How to have some other characters in entry basename automatically written by Afshin Haghighatnia on Dec 22, 2011

173 737

Last Topic: About the MT version stated in HTML source by Alex E. Schneider on Feb 7, 2012

190 567

Last Topic: Analytics Reporting by michael webster on Feb 5, 2012

48 210

Last Topic: An idea and also a request by Afshin Haghighatnia on Jun 29, 2011

64 246

Last Topic: jQuery in MT 5.1 still at 1.4 - why? by perlmonkey on May 25, 2011

code.sixapart.com

137 478

Last Topic: Getting a thumbnail with xpath by Peter on Mar 13, 2011

222 720

Last Topic: Custom Field for Asset Not Appearing by android on Feb 9, 2012