Skip to content

Textarea values and ampersands #476#477

Merged
g105b merged 2 commits into
masterfrom
476-textarea-value
May 13, 2026
Merged

Textarea values and ampersands #476#477
g105b merged 2 commits into
masterfrom
476-textarea-value

Conversation

@g105b
Copy link
Copy Markdown
Member

@g105b g105b commented May 13, 2026

ElementTest has a new test: textValue_textAreaAmpersand, which isolates the bug in issue #476

The bug is caused by the textarea value setter using nodeValue, as this behaviour is expected with libxml's implementation with the current character set.

The solution requires special handling of strings when manipulating text areas in particular.

This PR closes #476

@g105b g105b self-assigned this May 13, 2026
@codacy-production
Copy link
Copy Markdown

codacy-production Bot commented May 13, 2026

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics -4 complexity · 0 duplication

Metric Results
Complexity -4
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@g105b
Copy link
Copy Markdown
Member Author

g105b commented May 13, 2026

The solution was to use the already-wrapped textContent property, seeing as textareas can not actually handle HTML content themselves.

@g105b g105b merged commit 830f080 into master May 13, 2026
63 checks passed
@g105b g105b deleted the 476-textarea-value branch May 13, 2026 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: String encoding when setting value of textarea

1 participant