changeset 10298:1c417b74f439 jdk-9+155

8172561: Copying String with "\r\n" to Clipboard duplicates "\r" Reviewed-by: ddhill
author tschindl
date Thu, 26 Jan 2017 15:05:56 -0500
parents fa1ee456b29e
children 4acf782435bf db22c2981809
files modules/javafx.graphics/src/main/java/com/sun/glass/ui/win/WinSystemClipboard.java
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/modules/javafx.graphics/src/main/java/com/sun/glass/ui/win/WinSystemClipboard.java	Thu Jan 26 08:39:26 2017 -0800
+++ b/modules/javafx.graphics/src/main/java/com/sun/glass/ui/win/WinSystemClipboard.java	Thu Jan 26 15:05:56 2017 -0500
@@ -82,7 +82,7 @@
             }
             return b;
         } else if (data instanceof String) {
-            String st = ((String) data).replace("\n", "\r\n");
+            String st = ((String) data).replaceAll("(\r\n|\r|\n)", "\r\n");
             if (HTML_TYPE.equals(mime)) {
                 try {
                     // NOTE: Transfer of HTML data on Windows uses UTF-8 encoding!