Make WordPress Core

Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#6685 closed defect (bug) (duplicate)

gallery shortcode no alt tag and script inside body tag and false html

Reported by: monika's profile Monika Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.5
Component: Optimization Keywords:
Focuses: Cc:

Description

wp-includes/media.php
1.

line 412

$output .= "
<br style='clear: both;' >
</div>\n";

the endslash is missing

  1. img tag without an alt attribut is not valide html, the alt attribute is not showing in my source if I'm using this shortcode
  1. <style type='text/css'>

is between body tag but this is false , is there a chance to give this between head tag.

I have no solution for this problems and so there is no attachment from me. But so I can't use this shortcode gallery . Thanks a lot

Change History (6)

#1 in reply to: ↑ description @Monika
16 years ago

  • Version set to 2.5

Replying to Monika:

wp-includes/media.php
1.

line 412

$output .= "
<br style='clear: both;' >
</div>\n";

the endslash is missing

  1. img tag without an alt attribut is not valide html, the alt attribute is not showing in my source if I'm using this shortcode
  1. <style type='text/css'>

is between body tag but this is false , is there a chance to give this between head tag.

I have no solution for this problems and so there is no attachment from me. But so I can't use this shortcode gallery . Thanks a lot

#2 @alastc
16 years ago

I second this bug, and would suggest that it will be easier to deal with if there were less options when adding images.

Currently there are both title and 'caption' inputs when adding an image through the new uploader. I would suggest that unless there's a strong use-case I'm not aware of, that there is only one short-description input, i.e. ditch caption.

I wrote it up here:
http://alastairc.ac/notes/web-applications/wordpress/clean-gallery/#interface-changes

In short, if there is only one, it can be used for the alt for the gallery (with less confusion). If you really must have a title, duplicate it, but personally I don't see the need?

If the 'caption' is shown visibly, make the alt null.

Providing the ability to add alternative text is a big deal, and something that Wordpress does (too?) well, and stands the app in good stead for ATAG (the authoring tool accessibility guidelines). However, this is not currently reflected in the output of the gallery.

#3 @ryan
16 years ago

  • Milestone changed from 2.5.2 to 2.9

Milestone 2.5.2 deleted

#4 @Viper007Bond
16 years ago

  • Milestone 2.9 deleted
  • Resolution set to duplicate
  • Status changed from new to closed

#5 @Viper007Bond
16 years ago

Actually, #6380 was about the_excerpt(), my bad.

However this ticket is a mess and is multiple issues in one. Let's transfer to the cleaner #7419 instead.

#6 @Viper007Bond
16 years ago

Actually, no, solving this issue would solve #6380

Note: See TracTickets for help on using tickets.