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

The FXML specification should make it clear that all URI paths should be encoded

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 8
    • 7u6
    • javafx
    • None


      Technical justification: The FXMLLoader uses new URL(URL, String) in order to resolve a relative URL against the FXML file location. This means that the second string parameter must be encoded as an URI path.

      What it means for the FXML author:
      When writing paths into the source attribute of an fx:include element, or when using the @ syntax, the path should be encoded as for an URI:
      http://docs.oracle.com/javase/6/docs/api/java/net/URI.html#encode

      For instance, if the file name contains whitespace - as in "My File" then the FXML should contain:
      <Image url="@My%20File"/>
      or
      <fx:include source="My%20File"/>
      rather than
      <Image url="My File"/>
      or
      <fx:include source="My File"/>

            gkbrown Greg Brown (Inactive)
            dfuchs Daniel Fuchs
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: