Project

Profile

Help

Bug #4337

closed

base-uri() call is incorrectly encoding the resulting URI.

Added by Jorge Williams over 4 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Low
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
2019-10-09
Due date:
% Done:

0%

Estimated time:
Applies to JS Branch:
Fix Committed on JS Branch:
Fixed in JS Release:
SEF Generated with:
Platforms:
Company:
-
Contact person:
-
Additional contact persons:
-

Description

Our application requires the base-uri in order to create links. The URI may contain query parameters:

for example : http://localhost:9090/path/to/app?param1=1&param2=2&param3=3

We get to the URI like this...

   <xsl:template match="/" >
       <xsl:variable name="url" select="base-uri(.)"/>
     .
     .
     .

The result that we get for $url is

http://localhost:9090/path/to/app?param1=1&amp;param2=2&amp;param3=3

We don't think this correct. Replacing & with an entity should be something that happens during serialization.

We expect the result to be:

 http://localhost:9090/path/to/app?param1=1&param2=2&param3=3

As a workaround we're currently doing this:

 <xsl:template match="/">
       <xsl:variable name="url" select="replace(base-uri(.), 'amp;','')" />

Thanks

Please register to edit this issue

Also available in: Atom PDF Tracking page