Uploaded image for project: 'PUBLIC - Liferay Faces'
  1. PUBLIC - Liferay Faces
  2. FACES-2945

The ResourceImpl.toRequestPath() method should not encode the return value

    Details

      Description

      The ResourceImpl.toRequestPath() method contains the following code:

      // In order to have Mojarra's ScriptRenderer and StylesheetRenderer function properly, this method first encodes
      // the URL returned by the wrapped resource.
      return facesContext.getExternalContext().encodeResourceURL(wrappedRequestPath);
      

      The comment implies that Mojarra's ScriptRenderer and StylesheetRenderer do not call ExternalContext.encodeResourceURL(String) with the result of calling Resource.toRequestPath(). However, the ScriptRenderer.java class in Mojarra 2.1.29-08 and the ScriptRenderer.java class in Mojarra 2.2.13 both do the encoding.

      It is therefore unnecessary and incorrect for ResourceImpl.toRequestPath() to encode the return value.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: