[support] HTML Filters

2 views
Skip to first unread message

Alison

unread,
Jan 7, 2011, 6:21:48 PM1/7/11
to sup...@drupal.org
Hi,

very much a newbie who feels that she is constantly "fighting" Drupal to get it to do what she wants it to do.

Fairly simple "home" page before members log on and get all the complicated stuff - list of events, accepting bookings for same and the like - with Views, Flags, Tokens etc.

CKEditor installed and fully operational. "Full HTML" selected and all "Input Filters" disabled on "Input Formats" page. Yet when displaying the page much of the HTML formatting I have implemented has been stripped off. Nothing special just paragraph alignment - simple stuff like text centering, etc. Looks fine when editing, but preview and much of it has gone. As it does when seen by a visitor. Tried it with CKEditor disabled and plain text editor selected . Doesn't seem to make any difference - formatting still gets stripped.

Not much point in using a wysiwyg style editor if Drupal strips all the functionality out. Also when using CHEditor the edit box has the same background as the main site, which makes life difficult if it's a dark background and the text one is editing is black. Would appreciate some clues.

Alison

--
[ Drupal support list | http://lists.drupal.org/ ]

rebu20...@yahoo.com

unread,
Jan 7, 2011, 6:59:13 PM1/7/11
to sup...@drupal.org
I'm new to Drupal as well, but I just guessing that its the CSS in the theme that you are using. Can you navigate to the page in your browser and then view the source? In Firefox, it is in the menu as 'View' > 'Page Source'. You should be able to see your HTML elements and attributes. If not, then they really have been stripped somehow. If they are there, then it is likely a CSS problem, assuming that your HTML is valid.
--ross


From: Alison <pen...@alisoncc.com>
To: sup...@drupal.org
Sent: Fri, January 7, 2011 5:21:48 PM
Subject: [support] HTML Filters

Joel Willers

unread,
Jan 7, 2011, 7:28:27 PM1/7/11
to sup...@drupal.org

You can make a special filter that might help you out.  Otherwise, set it to PHP (you have to have PHP enabled in the modules area).

 

Hope that helps!

 

Joel Willers  |  IT Developer
Innova Ideas & Services  
|  A SIGLER COMPANY

Bill Fitzgerald

unread,
Jan 7, 2011, 8:14:24 PM1/7/11
to sup...@drupal.org
I would recommend - strongly - against enabling the PHP input format. This opens up some enormous security risks, and from what you are describing this is overkill for your use case.

If you aren't using it already, I would recommend using the WYSIWYG API for your site: http://drupal.org/project/wysiwyg

Edit your node, and make sure that you have chosen the correct input format.

It's also possible that your WYSIWYG editor is clobbering your html; when you edit the node, turn off the editor and make sure that your original markup is still intact.

This page has more info on configuring input formats: http://drupal.org/handbook/modules/filter

Please feel free to ping back with any additional questions.

Cheers,

Bill

On 1/7/11 4:28 PM, Joel Willers wrote:

You can make a special filter that might help you out.� Otherwise, set it to PHP (you have to have PHP enabled in the modules area).

�

Hope that helps!

�

Joel Willers� | �IT Developer
Innova Ideas & Services �
| �A SIGLER COMPANY

�

From: support...@drupal.org [mailto:support...@drupal.org] On Behalf Of rebu20...@yahoo.com
Sent: Friday, January 07, 2011 5:59 PM
To: sup...@drupal.org
Subject: Re: [support] HTML Filters

�

I'm new to Drupal as well, but I just guessing that its the CSS in the theme that you are using. Can you navigate to the page in your browser and then view the source? In Firefox, it is in the menu as 'View' > 'Page Source'. You should be able to see your HTML elements and attributes. If not, then they really have been stripped somehow. If they are there, then it is likely a CSS problem, assuming that your HTML is valid.
--ross

�


From: Alison <pen...@alisoncc.com>
To: sup...@drupal.org
Sent: Fri, January 7, 2011 5:21:48 PM
Subject: [support] HTML Filters


Hi,

very much a newbie who feels that she is constantly "fighting" Drupal to get it to do what she wants it to do.

Fairly simple "home" page before members log on and get all the complicated stuff - list of events, accepting bookings for same and the like - with Views, Flags, Tokens etc.

CKEditor installed and fully operational. "Full HTML" selected and all "Input Filters" disabled on "Input Formats" page. Yet when displaying the page much of the HTML formatting I have implemented has been stripped off. Nothing special just paragraph alignment - simple stuff like text centering, etc.� Looks fine when editing, but preview and much of it has gone. As it does when seen by a visitor. Tried it with CKEditor disabled and plain text editor selected . Doesn't seem to make any difference - formatting still gets stripped.

Carl Wiedemann

unread,
Jan 7, 2011, 8:48:20 PM1/7/11
to sup...@drupal.org
Using Full HTML is also a security risk for cross site scripting and cross site request forgeries.

Keep in mind that input formats are node-specific at the time the node is saved. Changing the default format will not affect saved nodes.

The editor may also affect submitted data.

Sent from my iPhone

On Jan 7, 2011, at 17:14, Bill Fitzgerald <bi...@funnymonkey.com> wrote:

I would recommend - strongly - against enabling the PHP input format. This opens up some enormous security risks, and from what you are describing this is overkill for your use case.

If you aren't using it already, I would recommend using the WYSIWYG API for your site: http://drupal.org/project/wysiwyg

Edit your node, and make sure that you have chosen the correct input format.

It's also possible that your WYSIWYG editor is clobbering your html; when you edit the node, turn off the editor and make sure that your original markup is still intact.

This page has more info on configuring input formats: http://drupal.org/handbook/modules/filter

Please feel free to ping back with any additional questions.

Cheers,

Bill

On 1/7/11 4:28 PM, Joel Willers wrote:

You can make a special filter that might help you out.  Otherwise, set it to PHP (you have to have PHP enabled in the modules area).

 

Hope that helps!

 

Joel Willers  |  IT Developer
Innova Ideas & Services  
|  A SIGLER COMPANY

 

From: support...@drupal.org [mailto:support...@drupal.org] On Behalf Of rebu20...@yahoo.com
Sent: Friday, January 07, 2011 5:59 PM
To: sup...@drupal.org
Subject: Re: [support] HTML Filters

 

I'm new to Drupal as well, but I just guessing that its the CSS in the theme that you are using. Can you navigate to the page in your browser and then view the source? In Firefox, it is in the menu as 'View' > 'Page Source'. You should be able to see your HTML elements and attributes. If not, then they really have been stripped somehow. If they are there, then it is likely a CSS problem, assuming that your HTML is valid.
--ross

 


From: Alison <pen...@alisoncc.com>
To: sup...@drupal.org
Sent: Fri, January 7, 2011 5:21:48 PM
Subject: [support] HTML Filters


Hi,

very much a newbie who feels that she is constantly "fighting" Drupal to get it to do what she wants it to do.

Fairly simple "home" page before members log on and get all the complicated stuff - list of events, accepting bookings for same and the like - with Views, Flags, Tokens etc.

CKEditor installed and fully operational. "Full HTML" selected and all "Input Filters" disabled on "Input Formats" page. Yet when displaying the page much of the HTML formatting I have implemented has been stripped off. Nothing special just paragraph alignment - simple stuff like text centering, etc.  Looks fine when editing, but preview and much of it has gone. As it does when seen by a visitor. Tried it with CKEditor disabled and plain text editor selected . Doesn't seem to make any difference - formatting still gets stripped.



Not much point in using a wysiwyg style editor if Drupal strips all the functionality out. Also when using CHEditor the edit box has the same background as the main site, which makes life difficult if it's a dark background and the text one is editing is black. Would appreciate some clues.

Alison







--
[ Drupal support list | http://lists.drupal.org/ ]

Alison

unread,
Jan 7, 2011, 9:21:42 PM1/7/11
to sup...@drupal.org

Thanks Carl and others. I think this may be the problem:-


"Keep in mind that input formats are node-specific at the time the node is saved. Changing the default format will not affect saved nodes.

Been trying to fix the problem after I had saved the page, with now understandable results - changing the parameters after the event. Had considered the node may have been cached. So cleared that. Tried everything other than redesign the page or starting again. Definitely a trap for new players. Thanks again.

Alison
From: Alison <pen...@alisoncc.com>
To: sup...@drupal.org
Sent: Fri, January 7, 2011 5:21:48 PM
Subject: [support] HTML Filters

Hi,

very much a newbie who feels that she is constantly "fighting" Drupal to get it to do what she wants it to do.

Fairly simple "home" page before members log on and get all the complicated stuff - list of events, accepting bookings for same and the like - with Views, Flags, Tokens etc.

CKEditor installed and fully operational. "Full HTML" selected and all "Input Filters" disabled on "Input Formats" page. Yet when displaying the page much of the HTML formatting I have implemented has been stripped off. Nothing special just paragraph alignment - simple stuff like text centering, etc.  Looks fine when editing, but preview and much of it has gone. As it does when seen by a visitor. Tried it with CKEditor disabled and plain text editor selected . Doesn't seem to make any difference - formatting still gets stripped.

Not much point in using a wysiwyg style editor if Drupal strips all the functionality out. Also when using CHEditor the edit box has the same background as the main site, which makes life difficult if it's a dark background and the text one is editing is black. Would appreciate some clues.

Alison







--
[ Drupal support list | http://lists.drupal.org/ ]

--
[ Drupal support list | http://lists.drupal.org/ ]

Bert Van Kets

unread,
Jan 10, 2011, 5:53:24 AM1/10/11
to sup...@drupal.org
I was thought that Drupal saved the entered data in the database as is, unfiltered. The filtering is done on retrieval and rendering.
Your finding conflicts with this.

How is the node content saved in the database then? As entered, or filtered?

Bert

Earnie Boyd

unread,
Jan 10, 2011, 7:58:59 AM1/10/11
to sup...@drupal.org
Bert Van Kets wrote:
> I was thought that Drupal saved the entered data in the database as is,
> unfiltered. The filtering is done on retrieval and rendering.
> Your finding conflicts with this.
>
> How is the node content saved in the database then? As entered, or filtered?
>

My experience tells me that the database data contains the entered data
and the filter controls the display of that data.

--
Earnie
-- http://progw.com
-- http://www.for-my-kids.com

Metzler, David

unread,
Jan 10, 2011, 12:36:51 PM1/10/11
to sup...@drupal.org
For the newbies and others:  Creating a new input format does require editing each node, but often the problem with new sites is just that you want a few more HTML tags that aren't in the default filter configuration.  Remember that you can always add a few tags to the default input (Filtered HTML) format by confuring the html filter for the current default.  p is one that I often add to sites, and sometime a. Changing that configuration does not require editing each node.
 
Dave


From: support...@drupal.org [mailto:support...@drupal.org] On Behalf Of Alison
Sent: Friday, January 07, 2011 6:22 PM

Jamie Holly

unread,
Jan 10, 2011, 12:56:11 PM1/10/11
to sup...@drupal.org
That's how it works. Check_markup is called in node_prepare.

Jamie Holly
http://www.intoxination.net
http://www.hollyit.net


On 1/10/2011 7:58 AM, Earnie Boyd wrote:
> Bert Van Kets wrote:
> > I was thought that Drupal saved the entered data in the database as is,
> > unfiltered. The filtering is done on retrieval and rendering.
> > Your finding conflicts with this.
> >
> > How is the node content saved in the database then? As entered, or filtered?
> >
>
> My experience tells me that the database data contains the entered data
> and the filter controls the display of that data.
>
--

Afan Pasalic

unread,
Jan 10, 2011, 10:09:42 PM1/10/11
to sup...@drupal.org
Hi,
I wonder if there is a module I can use to upload excel/csv/tab
delimited file with articles (title, date created, teaser, body,...) to
Drupal driven website?

Any help is appreciated.

Thanks,
Afan

Maurice Mengel

unread,
Jan 10, 2011, 11:48:46 PM1/10/11
to sup...@drupal.org
I looked into this a while back and it was possible for 6.x, but I
don't remember the details. Maybe you have a look at Feeds. It has a
nice cvs importer.

Shyamala Rajaram

unread,
Jan 10, 2011, 11:50:54 PM1/10/11
to sup...@drupal.org
did you try: Node import module: http://drupal.org/project/node_import

Shyamala
--
Blog and Twitter :)

Carl Wiedemann

unread,
Jan 11, 2011, 1:14:10 PM1/11/11
to sup...@drupal.org
To clarify Bert's question: Yes the text is saved as unfiltered, but there is a format column in the node_revisions table which describes how to format the node for that particular version. Changing the default site format after saving a node will not update this column.

As David remarked, changing parameters of formats in usage will be visible.
Reply all
Reply to author
Forward
0 new messages