Attributes on the <script> tag

Lists: pgsql-www
From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: PostgreSQL WWW <pgsql-www(at)postgresql(dot)org>
Subject: Attributes on the <script> tag
Date: 2017-06-27 19:51:32
Message-ID: 76841142-699E-47A7-A19D-2F62C8297ACA@yesql.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-www

In both XHTML and HTML5, the language attribute has been deprecated for quite
some time with the type attribute setting the type of embedded content.

For HTML5, the type attribute has further been defined to text/javascript as
the default value in the spec, so no attribute should be used for Javascript
content (per the standard: https://www.w3.org/TR/html5/scripting-1.html) In
XHTML however, the type tag is mandatory.

The attached patches fixes the Commitfest app as well as the main website. The
current code breaks XHTML/HTML validation.

cheers ./daniel

Attachment Content-Type Size
cf_script_attrs.patch application/octet-stream 2.3 KB
pgweb-script_attrs.patch application/octet-stream 3.6 KB

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Daniel Gustafsson <daniel(at)yesql(dot)se>
Cc: PostgreSQL WWW <pgsql-www(at)postgresql(dot)org>
Subject: Re: Attributes on the <script> tag
Date: 2017-06-27 20:20:35
Message-ID: CABUevEzxZag28gcdXCQUaRUpv89TMZFKAvJGOUPrMLbh0FD_2A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-www

On Tue, Jun 27, 2017 at 9:51 PM, Daniel Gustafsson <daniel(at)yesql(dot)se> wrote:

> In both XHTML and HTML5, the language attribute has been deprecated for
> quite
> some time with the type attribute setting the type of embedded content.
>
> For HTML5, the type attribute has further been defined to text/javascript
> as
> the default value in the spec, so no attribute should be used for
> Javascript
> content (per the standard: https://www.w3.org/TR/html5/scripting-1.html)
> In
> XHTML however, the type tag is mandatory.
>
> The attached patches fixes the Commitfest app as well as the main
> website. The
> current code breaks XHTML/HTML validation.
>

Applied to both, thanks.

--
Magnus Hagander
Me: https://www.hagander.net/ <http://www.hagander.net/>
Work: https://www.redpill-linpro.com/ <http://www.redpill-linpro.com/>