Skip to content

Compiler looses name of entity references in XML attribute values #5133

Closed
@scabug

Description

@scabug

The name of the entity ("oacute" in this example) is lost:

scala> <input value="Adi&oacute;s" />
res0: scala.xml.Elem = <input value="Adi&;s"></input>

scala> <input value="Adi&oacute;s" />.attributes.value(1).asInstanceOf[scala.xml.EntityRef].text
res1: String = &;

Note this is different from behaviour in Element content:

scala> <p>Adi&oacute;s</p>.child(1).asInstanceOf[scala.xml.EntityRef].text
res2: String = &oacute;

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions