Bug #74992 [NEW]: wrong behaviour for attribute "selected"
| From: | yuriy at vihv dot org | Date: | Wed, 26 Jul 2017 09:50:01 +0000 |
| Subject: | Bug #74992 [NEW]: wrong behaviour for attribute "selected" | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-210342@lists.php.net to get a copy of this message | ||
From: yuriy at vihv dot org
Operating system: Linux Fedora 24.x86_64
PHP version: 7.0.21
Package: XSLT related
Bug Type: Bug
Bug description:wrong behaviour for attribute "selected"
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 bug report at https://bugs.php.net/bug.php?id=74992&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=74992&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=74992&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=74992&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=74992&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=74992&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=74992&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=74992&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=74992&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=74992&r=support
Expected behavior: https://bugs.php.net/fix.php?id=74992&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=74992&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=74992&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=74992&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=74992&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=74992&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=74992&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=74992&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=74992&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=74992&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=74992&r=mysqlcfg