Bug #74992 [Opn->Nab]: wrong behaviour for attribute "selected"
| From: | requinix@php.net | Date: | Wed, 26 Jul 2017 12:25:12 +0000 |
| Subject: | Bug #74992 [Opn->Nab]: wrong behaviour for attribute "selected" | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-210354@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=74992&edit=1
ID: 74992
Updated by: requinix@php.net
Reported by: yuriy at vihv dot org
Summary: wrong behaviour for attribute "selected"
-Status: Open
+Status: Not a bug
Type: Bug
Package: XSLT related
Operating System: Linux Fedora 24.x86_64
PHP Version: 7.0.21
Block user comment: N
Private report: N
New Comment:
as commented
Previous Comments:
------------------------------------------------------------------------
[2017-07-26 10:03:46] yuriy at vihv dot org
Oopps, sorry, that's firefox problem. Firebug showed 'selected=""' but
source codes as text are correct, just "selected".
Sorry for bothering you.
------------------------------------------------------------------------
[2017-07-26 09:49:54] yuriy at vihv dot org
Description:
------------
during transformation to XML attribute "selected" always set to empty string.
That might be ok for trasformation to HTML, but for XML it's wrong.
If I rename attribute - all works as expected.
Also on earlier version selected works just fine.
Test script:
---------------
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" encoding="utf-8" indent="no"/>
<xsl:template name="selectTemplate">
<select>
<option value="123" selected="selected">value</option>
</select>
</xsl:template>
</xsl:stylesheet>
Expected result:
----------------
Correct XHTML will be
<select>
<option value="123" selected="selected">value</option>
</select>
or at least it should be correct HTML5
<select>
<option value="123" selected>value</option>
</select>
Actual result:
--------------
<select>
<option value="123" selected="">value</option>
</select>
Firefox treat this element as NOT selected
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=74992&edit=1