Skip to content

In v1.12.6 and later .GetAttribute("value") fails to return the correct value if it contains "{"  #946

@brettwinters

Description

@brettwinters

After upgrading from v1.11.7 -> v1.12.6, .GetAttribute("value") fails to return the value if it contains "{" (my use case here is that I'm displaying json 'log' data in a text area)

Simplified (not real json, no binding, etc):

<textarea value="@("{ \"abc\" }")"></textarea>

The test:

Assert.Equal(
    expected: "{ \"abc\" }",
    actual: cut.Find("textarea").GetAttribute("value")
);

In v1.12.6 and later the test fails with value = "{\n "

In all versions, printing the output in the immediate: cut.Find("textarea") outputs:

OuterHtml: "<textarea id=\"myText\" value=\"{ \" abc\"=\"\" }\"=\"\"></textarea>"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions