Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8248903

Javadoc: Don't use "Zero Width Space" (U+200B)

    Details

    • Type: Enhancement
    • Status: New
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 14.0.1
    • Fix Version/s: None
    • Component/s: tools

      Description

      A DESCRIPTION OF THE PROBLEM :
      Javadoc currently uses the "Zero Width Space" (U+200B / ​) character at multiple places to hint where the browser may break lines, see also JDK-8175200 (and JDK-8176792). This solves the display problem but causes issues when the user tries to copy text from the documentation to the clipboard.

      Both Firefox 78.0.1 (64-Bit) and Edge 81.0.416.86 (Official build) (64-bit) copy the "zero width space" within a text selection to clipboard. This can be quite annoying because many text editors do not display this character and the user then wonders after pasting the clipboard content why they are getting mismatches when comparing it with other text.

      Would it be possible to refrain from using the "zero width space" and instead using the functionality provided by CSS (in case this can be solved using it)?

      ---------------

      Reproduction steps:
      1. Open the documentation of any class, with a method with at least one parameter, in the browser, e.g. https://docs.oracle.com/en/java/javase/14/docs/api/java.base/java/lang/String.html#charAt(int)
      2. Select the text "charAt(int index)" of the documentation
      3. Paste it e.g. in a text editor and look at the displayed length of the text (e.g. by looking at the column numbers)
      (x) It is 18 instead of the expected 17 because it contains the "zero width space"



        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                webbuggrp Webbug Group
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: