Project

Profile

Help

Bug #5667

closed

ixsl:eval argument starting with a newline fails to evaluate

Added by Martynas Jusevicius about 2 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Low
Assignee:
-
Category:
-
Sprint/Milestone:
Start date:
2022-08-30
Due date:
% Done:

100%

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

Description

<xsl:variable name="js-statement" as="xs:string"><![CDATA[(function isString (item) { return typeof item == 'string'})]]></xsl:variable>
<xsl:variable name="js-function" select="ixsl:eval($js-statement)"/>
<xsl:value-of select="exists($js-function)"/>

returns true

<xsl:variable name="js-statement" as="xs:string"><![CDATA[
(function isString (item) { return typeof item == 'string'})]]></xsl:variable>
<xsl:variable name="js-function" select="ixsl:eval($js-statement)"/>
<xsl:value-of select="exists($js-function)"/>

returns false

<xsl:variable name="js-statement" as="xs:string"><![CDATA[
(function isString (item) { return typeof item == 'string'})]]></xsl:variable>
<xsl:variable name="js-function" select="ixsl:eval(normalize-space($js-statement))"/>
<xsl:value-of select="exists($js-function)"/>

returns true (note normalize-space())

Please register to edit this issue

Also available in: Atom PDF Tracking page