php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #63439 language attribute on script tags deprecated
Submitted: 2012-11-05 15:21 UTC Modified: 2012-11-06 01:49 UTC
From: alastair at propcom dot co dot uk Assigned:
Status: Wont fix Package: Scripting Engine problem
PHP Version: Irrelevant OS: all
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: alastair at propcom dot co dot uk
New email:
PHP Version: OS:

 

 [2012-11-05 15:21 UTC] alastair at propcom dot co dot uk
Description:
------------
PHP can be opened with <script language="php">

But the language attribute is deprecated: 
http://www.w3.org/TR/html4/interact/scripts.html

It should use "type" instead.

Also the tag does not support charset.

Test script:
---------------
<script language="php">
  echo "Hello";
</script>

<script type="application/php">
  echo "Hello"
</script>

Expected result:
----------------
<script language="php">
  echo "Hello";
</script>

Hello

Actual result:
--------------
Hello

<script type="application/php">
  echo "Hello"
</script>

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-11-06 01:49 UTC] aharvey@php.net
-Status: Open +Status: Wont fix
 [2012-11-06 01:49 UTC] aharvey@php.net
Since it's handled on the server side and the user agent never sees it, compliance with HTML is rather pointless.

If anything, I think we'd be more likely to look at deprecating the <script> form altogether, rather than adding new variations.

Closing Won't Fix.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 09 23:01:33 2025 UTC