[Piglit] [PATCH 3/4] summary/html: ensure xml-line is the very first line

Dylan Baker dylan at pnwbakers.com
Mon Jan 28 18:57:12 UTC 2019


Quoting Erik Faye-Lund (2019-01-21 08:00:56)
> Otherwise, GNOME Web (Epiphany) refuse to render the result.
> 
> Signed-off-by: Erik Faye-Lund <erik.faye-lund at collabora.com>
> ---
>  templates/feature.mako | 3 ++-
>  templates/index.mako   | 3 ++-
>  2 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/templates/feature.mako b/templates/feature.mako
> index 9abd5bc31..7d2c400d9 100644
> --- a/templates/feature.mako
> +++ b/templates/feature.mako
> @@ -1,3 +1,5 @@
> +<?xml version="1.0" encoding="UTF-8"?>
> +
>  <%!

in mako nothing can come before the <%! value, this needs to be first.

>    import posixpath  # this must be posixpath, since we want /'s not \'s
>    import re
> @@ -25,7 +27,6 @@
>        return href.replace('\\', '/')
>  %>
>  
> -<?xml version="1.0" encoding="UTF-8"?>
>  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
>   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
>  <html xmlns="http://www.w3.org/1999/xhtml">
> diff --git a/templates/index.mako b/templates/index.mako
> index 49a8b1c86..6338fecb4 100644
> --- a/templates/index.mako
> +++ b/templates/index.mako
> @@ -1,3 +1,5 @@
> +<?xml version="1.0" encoding="UTF-8"?>
> +
>  <%!
>    import os
>    import posixpath  # this must be posixpath, since we want /'s not \'s
> @@ -57,7 +59,6 @@
>        return href.replace('\\', '/')
>  %>
>  
> -<?xml version="1.0" encoding="UTF-8"?>
>  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
>   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
>  <html xmlns="http://www.w3.org/1999/xhtml">
> -- 
> 2.20.1
> 
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/piglit
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: signature
URL: <https://lists.freedesktop.org/archives/piglit/attachments/20190128/cb68984b/attachment.sig>


More information about the Piglit mailing list