www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11005] New: std.xml does not encode attributes

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=11005

           Summary: std.xml does not encode attributes
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody puremagic.com
        ReportedBy: r.sagitario gmx.de


--- Comment #0 from Rainer Schuetze <r.sagitario gmx.de> 2013-09-10 00:09:37
PDT ---
This program:

import std.xml;
import std.stdio;

void main()
{
    string s = `<tag attr="&quot;value&gt;"></tag>`;
    auto doc = new Document(s);
    writeln("attr = ", doc.tag.attr["attr"]);
    writeln(doc);
}

compiles and runs with output

attr = "value>
<tag attr=""value>" />

The expected output is

attr = "value>
<tag attr="&quot;value&gt;" />

The xml writer does not encode " and < of the stribute string (actually, it
decaodes them again).

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 10 2013
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=11005


Rainer Schuetze <r.sagitario gmx.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull


--- Comment #1 from Rainer Schuetze <r.sagitario gmx.de> 2013-09-10 00:29:01
PDT ---
https://github.com/D-Programming-Language/phobos/pull/1558

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 10 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=11005



--- Comment #2 from github-bugzilla puremagic.com 2013-09-10 00:33:13 PDT ---
Commit pushed to master at https://github.com/D-Programming-Language/phobos

https://github.com/D-Programming-Language/phobos/commit/e1ed1ae8a888af2622aa31aa8963b95af895f950
Merge pull request #1558 from rainers/std_xml_attr_encode

 Issue 11005 - std.xml does not encode attributes

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 10 2013