By default, every description field as well as the comments allow certain HTML tags. But, at least for the comments, I want to have just a plain, simple textarea field, nothing more, nothing less. Links may be turned into working hyperlinks automatically, and of course dangerous code should be stripped out. How can I do that? I already had a look at the input formats but I do not find any "plain text" format there.

Comments

vertazzar’s picture

than add a new format and define that you want to strip all tags except allowed ones, and set in settings that you want to links-to-be-turned

jaochoo’s picture

How can I do that? As mentioned earlier, I already tried all the settings in Input Formats, but I do not find how to create a Input Format for plain text.

Dubber Dan’s picture

Go to /admin/settings/filters where you will see a tab to Add input format and you then pick what settings you want for that format, so for plain text you strip out the html tags.

I've done this, but still have some issues/questions.

Have created an input format, called it guest and removed all html tags and it does what I want - ie provides a purely plain text input type. I want to use this for blog comments, so have set this as the default input format and the comment field works just fine (http://www.makemoneygofurther.co.uk/webbs-words/2010/may/mortgages/summe...)

The problem is that the custom format I have created for the blog editor is set to be filtered HTML and CKeditor, but as the stripped down guest format is default, the editor has to change the format type each time they create a blog post.

So ho do I keep the default as the stripped down guest format for comments only, and then set the default for blog posts to be the editor format?

Dubber Dan’s picture

Better Formats module seems to give lots of controls which do the trick nicely http://drupal.org/project/better_formats

jtpalette’s picture

For me, I just adjusted what was available for each role. So, for "authenticated" users, I deselected Filtered HTML as an option. By default they can only comment in plain text.

You can then create new roles specifically for brand-new content editors/contributors.

murat_halici’s picture