Make WordPress Core

Opened 17 years ago

Closed 17 years ago

#12429 closed defect (bug) (fixed)

onclick/onClick attribute should all be lowercase

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

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 17 years ago.
Patch replaces "onClick" with "onclick" throughout core
12429.diff​ (32.1 KB ) - added by Denis-de-Bernardy 17 years ago.
12429.2.patch​ (3.6 KB ) - added by TobiasBg 17 years ago.
Patch to replace "onClick" with "onclick", introduced in [13600]

Download all attachments as: .zip

Change History (12)

@TobiasBg
17 years ago

Patch replaces "onClick" with "onclick" throughout core

#1 @nacin
17 years ago

  • Resolution → fixed
  • Status new → closed

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

#2 @Denis-de-Bernardy
17 years ago

  • Resolution fixed
  • Status closed → reopened

attached patch catches a few more

#3 @nacin
17 years ago

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

#4 @TobiasBg
17 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
17 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
17 years ago

  • Type enhancement → defect (bug)

#7 @TobiasBg
17 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
17 years ago

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

#8 @nacin
17 years ago

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

#9 @rmccue
17 years ago

  • Resolution → fixed
  • Status reopened → closed

All of these appear to be gone now.

Note: See TracTickets for help on using tickets.