3.0: Error parsing XSLT when preview field is short
Hi,
First, thank you for XSLTsearch :)
In version 3.0, when the previewType is 'BEGINNING', if a preview field contains the search term, but is less than 2 characters longer than the search term, then the search fails with "Error parsing XSLT file". To clarify, the error only occurs when the contents of the preview field are an exact match for the search term, OR the preview field contains only the search term and 1 other character.
I have narrowed this down the following line of code:
3.0: Error parsing XSLT when preview field is short
Hi,
First, thank you for XSLTsearch :)
In version 3.0, when the previewType is 'BEGINNING', if a preview field contains the search term, but is less than 2 characters longer than the search term, then the search fails with "Error parsing XSLT file". To clarify, the error only occurs when the contents of the preview field are an exact match for the search term, OR the preview field contains only the search term and 1 other character.
I have narrowed this down the following line of code:
<xsl:value-of select="PS.XSLTsearch:surround(PS.XSLTsearch:escapingIntelligentSubstring($escapedData, 0, $previewChars), $search, $before, $after)" disable-output-escaping="yes"/>
I'm guessing it's an off-by-one error in the XSLT extension?
Cheers,
Stephen.
What an awesome bug report of a very particular bug. Thanks for that.
I'll let you know as soon as I've debugged it and got a solution.
cheers,
doug.
is working on a reply...