Moodle

Validome - moodle.org invalid - require Content-Script-Type

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.8, 1.9, 2.0
  • Fix Version/s: 1.9, 2.0
  • Component/s: Other
  • Labels:
    None

Description

W3C validator does NOT pick this up (DTD/validator limitation), but it IS in HTML 4.01 Spec,
http://w3.org/TR/html401/interact/scripts.html#h-18.2.2.1

Validome HTML/ XHTML ... validator, access 13/11:
"
The Document is not valid
XHTML 1.0 Strict
...
Line: 89, Column: 357
Error: When using embedded events (Event-Handler), script language must be
specified within Meta-Tag
(z.B. <meta http-equiv="Content-Script-Type" content="text/javascript" />)
or HTTP-Header (Content-Script-Type: text/javascript)
Error Position:
lect id="chooselang_jump" name="jump" onchange="self.location=document.getEl
"

TODO: Also, 8 warnings "The Link "#" points to a not existing Anchor." - where?
(OU Bug 4121)

Issue Links

Activity

Hide
Nick Freear added a comment -

Given the choice of a <meta /> or HTTP header, I think a HTTP header is cleaner. Here's the fix in lib/weblib.php print_header function,
@header('Content-Script-Type: text/javascript');
@header('Content-Style-Type: text/css');

Also fixes inline styles "14.2.1 Setting the default style sheet language",
http://www.w3.org/TR/html401/present/styles.html#h-14.2.1

Fixed on HEAD and 1.9 branch, tagged MERGED.

Show
Nick Freear added a comment - Given the choice of a <meta /> or HTTP header, I think a HTTP header is cleaner. Here's the fix in lib/weblib.php print_header function, @header('Content-Script-Type: text/javascript'); @header('Content-Style-Type: text/css'); Also fixes inline styles "14.2.1 Setting the default style sheet language", http://www.w3.org/TR/html401/present/styles.html#h-14.2.1 Fixed on HEAD and 1.9 branch, tagged MERGED.
Hide
Nick Freear added a comment -

("Accessibility" is wrong component for this bug - need new component "Web standards", also "Javascript"? Mark as "Other" for the moment.)

Show
Nick Freear added a comment - ("Accessibility" is wrong component for this bug - need new component "Web standards", also "Javascript"? Mark as "Other" for the moment.)
Hide
Nick Freear added a comment -

(Add link to 1.9 meta-bug.)

Show
Nick Freear added a comment - (Add link to 1.9 meta-bug.)

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: