Make WordPress Core

Opened 16 years ago

Closed 16 years ago

#12429 closed defect (bug) (fixed)

onclick/onClick attribute should all be lowercase

Reported by: tobiasbg's profile TobiasBg Owned by:
Milestone: 3.0 Priority: normal
Severity: normal Version:
Component: General Keywords: has-patch commit
Focuses: Cc:

Description

dd32 mentioned that various code editors replace "onclick" attributes with "onClick".
However, this breaks XHTML validation as all attributes need to be lowercase.
Recent commits ([13242], [13503]) commited such changes to core.

Attached patch replaces all found (grep) occurances of "onClick" in core with "onclick".

Attachments (3)

12429-onclick.patch (6.1 KB) - added by TobiasBg 16 years ago.
Patch replaces "onClick" with "onclick" throughout core
12429.diff (32.1 KB) - added by Denis-de-Bernardy 16 years ago.
12429.2.patch (3.6 KB) - added by TobiasBg 16 years ago.
Patch to replace "onClick" with "onclick", introduced in [13600]

Download all attachments as: .zip

Change History (12)

@TobiasBg
16 years ago

Patch replaces "onClick" with "onclick" throughout core

#1 @nacin
16 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [13510]) s/onClick/onclick/. props TobiasBg fixes #12429

#2 @Denis-de-Bernardy
16 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

attached patch catches a few more

#3 @nacin
16 years ago

Will handle, though your patch would revert [13503]. Would this otherwise apply clean? Looks like .dev.js sheets are missing.

#4 @TobiasBg
16 years ago

Oh, sht. Didn't check in JavaScript files... Thanks Denis!

Although colorpicker.dev.js will probably need more cleanup, as having all uppercase attributes around a lowercase "onclick" doesn't look to good somehow (and is probably also invalid XHTML):

<A HREF="#" onclick="cp.select(document.forms[0].color,'pick');return false;" NAME="pick" ID="pick">Pick</A>

#5 @dd32
16 years ago

Sorry for those again.. I cant for the life of me work out why my code edits are insisting changing those even with that functionality disabled! (And tortoise seems to miss case changes in the preview)

#6 @nacin
16 years ago

  • Type changed from enhancement to defect (bug)

#7 @TobiasBg
16 years ago

dd32 was so kind to change a few more "onClick"s in [13600], so that I'm again able to contribute a little :-)

Attached patch changes them back to "onclick".

The only remaining "onClick"s throughout core are in the .js files as Denis mentioned.

@TobiasBg
16 years ago

Patch to replace "onClick" with "onclick", introduced in [13600]

#8 @nacin
16 years ago

(In [13612]) s/onClick/onclick/. props TobiasBg, see #12429

#9 @rmccue
16 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

All of these appear to be gone now.

Note: See TracTickets for help on using tickets.