Even though I have <img> as an allowed tag, the filtered html filter gets rid of the guts of the tag (the pointer to the image) in Drupal 7 with TinyMCE. The html is just left with <img />. Ditto for font and span tags. This seems like a fundamental flaw. How do I allow users to insert images into filtered HTML posts?
James Rome wrote:
Even though I have <img> as an allowed tag, the filtered html filter gets rid of the guts of the tag (the pointer to the image) in Drupal 7 with TinyMCE. The html is just left with <img />. Ditto for font and span tags. This seems like a fundamental flaw. How do I allow users to insert images into filtered HTML posts?
You didn't say which version of Drupal. Perhaps the text within the <img /> tag isn't UTF-8 compatible, see the check_plain documentation.
That being said, it's important to verify whether it is a TinyMCE issue or a filter issue. If the source is modified so that src= disappears when TinyMCE is disabled, then you've got a TinyMCE configuration problem. IF the src attribute only disappears when the page is rendered, you have a filter or check_plain problem.
-----Original Message----- From: support-bounces@drupal.org [mailto:support-bounces@drupal.org] On Behalf Of Earnie Boyd Sent: Thursday, June 16, 2011 8:05 AM To: support@drupal.org Subject: Re: [support] How to allow images in filtered HTML
James Rome wrote:
Even though I have <img> as an allowed tag, the filtered html filter gets rid of the guts of the tag (the pointer to the image) in Drupal 7 with TinyMCE. The html is just left with <img />. Ditto for font and span tags. This seems like a fundamental flaw. How do I allow users to insert images into filtered HTML posts?
You didn't say which version of Drupal. Perhaps the text within the <img /> tag isn't UTF-8 compatible, see the check_plain documentation.
Actually, stripping of attributes from HTML is not a flaw, but a design of the filter. If you don't want that to happen you can either write your own filter or use the Full HTML option.
Keep in mind that IMG tags can introduce significant security threats into your site. Use them carefully. And, BTW, Drupal HTML should not have font tags at all - leave that to CSS.
Nancy Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.
From: James Rome
Even though I have <img> as an allowed tag, the filtered html filter gets rid of the guts of the tag (the pointer to the image) in Drupal 7 with TinyMCE. The html is just left with <img />. Ditto for font and span tags. This seems like a fundamental flaw. How do I allow users to insert images into filtered HTML posts?
It really sounds like a TinyMCE configuration issue. Try disabling TinyMCE and see if you can insert an image ok. I've been running a site in last December that has Drupal 7 and allows <img> in filtered HTML and I haven't had any problems out of it.
Jamie Holly http://www.intoxination.net http://www.hollyit.net
On 6/16/2011 9:03 AM, James Rome wrote:
Even though I have <img> as an allowed tag, the filtered html filter gets rid of the guts of the tag (the pointer to the image) in Drupal 7 with TinyMCE. The html is just left with <img />. Ditto for font and span tags. This seems like a fundamental flaw. How do I allow users to insert images into filtered HTML posts?