Issue Details (XML | Word | Printable)

Key: MDL-12153
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Nick Freear
Reporter: Nick Freear
Votes: 0
Watchers: 0
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

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

Created: 13/Nov/07 10:18 PM   Updated: 21/Nov/07 08:02 PM
Return to search
Component/s: Other
Affects Version/s: 1.8, 1.9, 2.0
Fix Version/s: 1.9, 2.0

Issue Links:
Blockers
 

URL: http://www.validome.org/validate/?uri=http://moodle.org/&extended=1
Participants: Nick Freear
Security Level: None
Resolved date: 13/Nov/07
Affected Branches: MOODLE_18_STABLE, MOODLE_19_STABLE, MOODLE_20_STABLE
Fixed Branches: MOODLE_19_STABLE, MOODLE_20_STABLE


 Description  « Hide
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)

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Nick Freear added a comment - 13/Nov/07 10:53 PM
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.


Nick Freear added a comment - 21/Nov/07 08:01 PM
("Accessibility" is wrong component for this bug - need new component "Web standards", also "Javascript"? Mark as "Other" for the moment.)

Nick Freear added a comment - 21/Nov/07 08:02 PM
(Add link to 1.9 meta-bug.)