I did a post with four images on http://demo.opensourcecms.com/drupal with the following code:

<img src="http://demo.opensourcecms.com/drupal/themes/pushbutton/logo.png" title="gluglu" alt="gluglu" />
<img src="http://demo.opensourcecms.com/drupal/themes/pushbutton/logo.png" title="gluglu1" alt="gluglu1"/>
<img src="http://demo.opensourcecms.com/drupal/themes/pushbutton/logo.png" />
<img src="http://demo.opensourcecms.com/drupal/themes/pushbutton/logo.png"/>

and when post is viewed this code is replaced by (edit/view source)

<img src="http://demo.opensourcecms.com/drupal/themes/pushbutton/logo.png" title="gluglu" alt="gluglu">
<img src="http://demo.opensourcecms.com/drupal/themes/pushbutton/logo.png" title="gluglu1">
<img src="http://demo.opensourcecms.com/drupal/themes/pushbutton/logo.png">
<img >

So:
1) if tag ends with space and /> the space and / is eliminated
2) if tag ends with /> the last attribute is stripped out

This bug can be reproduced on Drupal 4.6 too.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

he_who_shall_not_be_named’s picture

Title: Closed tags filtered out » A correction
<img src="http://demo.opensourcecms.com/drupal/themes/pushbutton/logo.png" title="gluglu" alt="gluglu" />
<img src="http://demo.opensourcecms.com/drupal/themes/pushbutton/logo.png" title="gluglu1" alt="gluglu1"/>
<img src="http://demo.opensourcecms.com/drupal/themes/pushbutton/logo.png" />
<img src="http://demo.opensourcecms.com/drupal/themes/pushbutton/logo.png"/>

Sorry for the &lt; and &gt; :)

he_who_shall_not_be_named’s picture

Additional information:

As input format I used HTML filter and Line break converter. My html filter is:

<h1> <h2> <h3> <h4> <h5> <h6> <em> <strong> <code> <del> <blockquote> <q> <sub> <p> <br> <pre> <ul> <ol> <li> <dl> <dt> <dd> <a> <b> <u> <i> <sup> <img>
varunvnair’s picture

Title: A correction » Closed tags filtered out

Reverting to original and meaningful title.

@vrencianz: When you follow-up any title that you give becomes the title of the report :-)

Zen’s picture

Priority: Critical » Normal

vrencianz: Can you please confirm this for the 4.7 betas or HEAD?

Thanks :)
-K

chx’s picture

Assigned: Unassigned » chx
Status: Active » Reviewed & tested by the community
FileSize
508 bytes

Well, it's true. Dries, please commit for all (4.5, 4.6, HEAD).

Dries’s picture

Status: Reviewed & tested by the community » Active

Committed to HEAD. Patch did not apply against DRUPAL-4-5 and DRUPAL-4-6.

chx’s picture

Status: Active » Needs work
magico’s picture

Version: 4.6.5 » 4.6.9

Must work on this to be applied to 4.6

magico’s picture

Status: Needs work » Needs review
FileSize
805 bytes

Here is the patch, backported from 4.7 to be applied to 4.6.9

magico’s picture

Version: 4.6.9 » 4.6.x-dev
FileSize
805 bytes

Rerolled for 4.6.x-dev from the previous backport.
Giving this a final chance to survive if it matters to anyone!

bdragon’s picture

Status: Needs review » Closed (won't fix)

Well, apparently it didn't. 4.6 is now unmaintained.