Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WButton is allowing 'whitespace only' text #1785

Open
JohnMcGuinness opened this issue Jun 22, 2021 · 0 comments · May be fixed by #1784
Open

WButton is allowing 'whitespace only' text #1785

JohnMcGuinness opened this issue Jun 22, 2021 · 0 comments · May be fixed by #1784
Assignees

Comments

@JohnMcGuinness
Copy link
Contributor

If a WButton has text that is empty, as defined by Util.empty, and also does not have an image URL, accessible text or a tooltip, then an error should be thrown by WButtonRenderer.

The Util.empty method's java doc says it returns 'true if the given String is null or contains only whitespace'. This is incorrect as it only checks for white space that has a character code which is less than the ' ' (space) characters code. It ignores any whitespace that has a character code greater than that. There are many Unicode Whitespace characters with a code greater than the space characters character code.

@JohnMcGuinness JohnMcGuinness self-assigned this Jun 22, 2021
@JohnMcGuinness JohnMcGuinness linked a pull request Jun 22, 2021 that will close this issue
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 a pull request may close this issue.

1 participant