Wysiwyg filter guide

in

Drupal core comes with two input formats: Filtered HTML and Full HTML. Filtered HTML format lets both authenticated and anonymous users enter comments and contents safely by limiting the allowed HTML tags to a very limited set with the HTML Filter. Full HTML is indented for admin use only because it allows any HTML tags and attributes to be used. WYSIWYG editors make use of many more tags and attributes to satisfy the full range of format options. Since the HTML Filter is only capable of allow or dis-allow of HTML tags, it is inadequate for complete safety because Wysiwyg editors make use of a large range of HTML tags and attributes. But for safty from XSS and other attacks, HTML tags and and attributes must be very precisely controlled so the Wysiwyg editor can safely render full range of styling format. The Wysiwyg Filter precisely satisfy this need: it lets you specify exactly what tags and what attributes are allowed in such a way that gives you the full rang of HTML tags and attributes required by the Wysiwyg editors and yet keeping the format completely safe. It's a replacement of the built-in HTML Filter.

With the Wysiwyg filter, you not only specify what tags are allowed, you also control what attributes the tags can have. With class/id/style attributes, you further specify exactly what are allowed to be used with those attributes. When the Wysiwyg filter module is installed, a new "WYSIWYG Filter" is added, use it in place of the HTML filter. For example, you can change the default "Filtered HTML" or create a new input format. I add a new "Rich HTML" format that allows more extensive HTML tags and attributes for use with Wysiwyg editor and leave the "Filtered HTML" input format unchanged.

Once the "WYSIWYG Filter" is enabled and saved, click the "Configure" local tab to setup the filter. Adjust the order of filters, then specify the "HTML elements and attributes":

this specifies what HTML tags and attributes are allowed. The Wysiwyg filter uses the TinyMCE valid_element syntax. If you specify the style and/or class/id attributes are allowed, then it's important to scroll down and expand the "Style properties" and "Advance rules" fieldsets to specify what are allowed in those attributes. If you neglect to specify those, the filter will warn you and tell you those attributes will be filtered out (this warning was added by your's truelyWink). The "Style properties" are all checkboxes to let you specify what style properties are allowed. Install the Checkall module to get a little enhancement to the form to let you check all of checkboxes at once. The "Advance rules" fieldset have text fields to let you specify what string text patterns are allowed in the class, id attributes and the style attribute's url property. These are simple text patterns and the asterisk (*) is a wild card for any number of zero or more characters. A begin string must be specified. So "abc*" is any sting begins with "abc", e.g. "abc-xyz". "format-*-class" is any string begins with "format-" and ends with "-class", e.g. "format-right-align-class".

The Wysiwyg filter also provides link spam deterrence. It adds rel="nofollow" to any URL link that's not on the whitelist. This will zap out anyone trying to fool search engine ranking by pretending to comment on your blog and add link to their site and clevely around it with <span style="display:none;">...<span style="display:none;">. No more spamdexing, Mr.!

Click the link to see a complete module settings screen png file.

Thanks for the explanation !!

Savior's picture

Thanks for the explanation !! It's very useful !!

I've tried to use the font size and style selector that comes with this page's tinyMCE but seems that is not filtering it properly :-(

I enjoy having as many

Friend's picture

I enjoy having as many styling points at my disposable. I find filtered html much to limiting, but understand the inclination to not allow full access to all users. The Wysiwyg filter seems interesting and relevant to my interests. How does it stack up against other style filters? Once I get it up and running, I'll test out some strings and see how I like it. Thanks! ripenaxrau hjd electroluxap fgd tpersonalcar

Wie die PKV verglichen

Friend's picture

Wie die PKV verglichen wird.

Die Goldpreisentwicklung einsehen

Eine Goldene Mastercard abschliessen

Den PKV Wechsel machen

This blog is perfect for

Cell Phone Spy's picture

This blog is perfect for anyone who want to know about this subject. Who knows how much its almost hard to argue with you. We are expecting the same best efforts from you later on as well.

This was such a great article

Clubmz e-spy's picture

This was such a great article in my opinion. This was really very special to me and I look forward to reading more of this valuable and great information.

 

 

Wie verschiedene

Friend's picture

Wie verschiedene Versicherungen verglichen werden.

Einen Basistarif testen.

Great blog, this could be the

Greg Welkins's picture

Great blog, this could be the best blog I ever visited this month. Never stop to write something useful dude!

Very good

Vanessa Ferreira's picture

Thank you for the filter.

Thanks

Webdesign's picture

Thanks for this article.

I am happy to find your

double cut saw's picture

I am happy to find your distinguished way of writing the post. Now you make it easy for me to understand and implement the concept. Thank you for the post.

about this topic, I have been

how to become a pilot's picture

about this topic, I have been lately in your blog once or twice now. I just wanted to say hi and show my thanks for the information provided.

nice

price of gold today's picture

Thank you very much for taking your time to create this very informative site.I have learned a lot from your site.

Hiee, I love your blogs

avena bailey's picture

Hiee, I love your blogs layout and style of your articles. I will subscribe for your feed please keep posting! Big thanks for the useful information I found here.
gold prices today per ounce

Wo das beste Angebot zur PKV

Friend's picture

Wo das beste Angebot zur PKV einfach durchschlägt.

It is such an important topic

double cut saw's picture

It is such an important topic and ignored by so many, even professionals! I do enjoy writing but it just seems like the first 10 to 15 minutes are lost simply just trying to figure out how to begin.

WYSIWYG

Miguel Gomes's picture

Hello,

Dreamweaver is my favorite, when it comes to WYSIWYG.

 

 

great blog

gold price per ounce 2011's picture

You are so talented in writing. God is really using you in tremendous methods. You are doing a great job! This was a wonderful article.Thank you

This is very important site.

current silver prices 2011's picture

This is very important site. It is very useful for me. Fantastic article! I thoroughly enjoyed your content …very effectively written.

I enjoy having as many

cloud computing's picture

I enjoy having as many styling points at my disposable. I find filtered html much to limiting, but understand the inclination to not allow full access to all users. The Wysiwyg filter seems interesting and relevant to my interests. How does it stack up against other style filters? Once I get it up and running, I'll test out some strings and see how I like it. Thanks!

nice blog

modular kitchen in india's picture

Great article. I want to thank you for this informative read, I really appreciate sharing this great blog. Keep up your work. Thanks for this very useful info you have provided us.

When the Wysiwyg filter

Dried Fruits's picture

When the Wysiwyg filter module is installed, a new "WYSIWYG Filter" is added, use it in place of the HTML filter.

hi

current silver prices per ounce's picture

This is very important site. It is very useful for me. Fantastic article! I thoroughly enjoyed your content …very effectively written.

Very Good Job of acknowledgmen

Phone Lookup's picture

I visited this page first time and found it Very Good Job of acknowledgment and a marvelous source of info.........Thanks Admin!

This is very important site.

cell phone spy software's picture

This is very important site. It is very useful for me. Fantastic article! I thoroughly enjoyed your content …very effectively written.

nice blog

how to get rid of gnats naturally's picture

There is obviously a lot to know about this.I think you made some good points in Features also.

nice

 get rid of this muffin top fast's picture

you are right when you say this.Hats off man,what a superlative knowledge you have on this subject.hope to see more work of yours.thanks

This was really very special

allopurinol dosage's picture

This was really very special to me and I look forward to reading more of this valuable and great information.

It is very useful for me.

what is citalopram's picture

It is very useful for me. Fantastic article! I thoroughly enjoyed your content …very effectively written.

Great read, this has been a

actos side effects's picture

Great read, this has been a very insightful article. Thanks so much for this quality writing.

Valuable information I found,

citalopram hbr's picture

Valuable information I found, the information that you provided is excellent post and a good job. It is my great pleasure to visit your website and to enjoy your excellent post.

I’ve desired to post about

Law school personal statement's picture

I’ve desired to post about something similar to this on one of my blogs and this has given me an idea. I’ve really found out a great deal studying this site. Plainly especially excellent content here

Outstanding blog post..

mississauga realtors's picture

Outstanding blog post, I have marked your site so ideally I’ll see much more on this subject in the foreseeable future...

you are appropriate

Frases Para Facebook's picture

you are appropriate if you say this.Hats off man,what a accomplished ability you accept on this subject.hope to see added plan of yours.thanks

moroccan tree

moroccan tree's picture

I was thinking to switch to other one but the offer from Drupal is attracting me again. I am confused.

chatting

geldherrin's picture

I just wanted to say hi and show my thanks for the information provided. about this topic, I have been lately in your blog once or twice now.

Your article is simply

special education Teacher salary's picture

Your article is simply fabulous. It?s got a lot of interesting information that is well-written, engaging and intelligent. Your ideas are very smart and fresh. Thank you for creating such unique content for your readers.

nice comment

saniyamirja0's picture

Brilliant aviator and helpful info sensing forwards to proximo posts in this land thanks a rattling gripping article, exciting ideas and a lot of keen questions posed Thanks for your insight for the outstanding longhand case

Φωτοβολταικα

hiiiiiiiiiii

saniyamirja0's picture

Good aviator. I hear something writer difficult on divergent blogs quotidian. It gift e'er be invigorating to indicate communication from remaining writers and exercise a slight something from their fund. I'd elevate to use many with the knowledge on my journal whether you don't obey. Naturally I'll spring you a attach on your web blog. Thanks for intercourse.Φωτοβολταικα

The presentation looks quite

purchase facebook likes's picture

The presentation looks quite nicely done. Explanation is nicely done and is quite easy to understand. The page is nicely designed and also the planning will be done perfectly

Nice Post

Single Muslim's picture

I really love to read articles that have good information and ideas to share to each reader.

Post new comment

The content of this field is kept private and will not be shown publicly.

Navigation

User login