From a281d73fc2d00a52e7b0dc3f1da060f80391cfb8 Mon Sep 17 00:00:00 2001
From: Tarek Oraby <42799254+tarekoraby@users.noreply.github.com>
Date: Mon, 6 Apr 2020 13:29:18 +0300
Subject: [PATCH] Fix sanitization of empty RTA input for Firefox & IE (#11937)
Browsers differ in what they return as the content of a visually empty rich text area (RTA). Accordingly, RTA sanitizes these different values ensuring an empty string is returned to the framework. However, existing sanitization criteria doesn't work for Firefox 74 and Internet Explorer 11.
This fix appends the sanitization criteria of Firefox 74 and IE 11, ensuring an empty string is returned to the framework for a a visually empty RTA.
Closes #10338
---
client/src/main/java/com/vaadin/client/ui/VRichTextArea.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/client/src/main/java/com/vaadin/client/ui/VRichTextArea.java b/client/src/main/java/com/vaadin/client/ui/VRichTextArea.java
index 1ed07c4cec..7f35ee4d4d 100644
--- a/client/src/main/java/com/vaadin/client/ui/VRichTextArea.java
+++ b/client/src/main/java/com/vaadin/client/ui/VRichTextArea.java
@@ -365,7 +365,7 @@ public class VRichTextArea extends Composite implements Field, KeyPressHandler,
BrowserInfo browser = BrowserInfo.get();
String result = getValue();
if (browser.isFirefox()) {
- if ("
".equals(result)) {
+ if ("
".equals(result) || "
".equals(result)) { + if ("
".equals(result) || "