Page 1 of 1

Search fails when a percent % symbol is used in the search term

Posted: Tue May 21, 2024 10:31 pm
by adorney1
oxygen-search-pct.zip
This is a bug report for OxygenXML 26.1, build 2024042206 and the search functionality of the DITA Map Webhelp Responsive output.

Given I have a topic containing a Windows-based variable path such as:

Code: Select all

%userprofile%
AND Given I build the DITA Map WebHelp Responsive output,
When I search for the exact term including percentage symbols,
Then the search crashes with an uncaught "URI malformed" error when calling decodeURIComponent and does not output search results.

Code: Select all

commons.js?buildId=2024041900:2 Uncaught URIError: URI malformed
    at decodeURIComponent (<anonymous>)
    at Function.value (search.js?buildId=2024041900:1:2659)
    at e.value (search.js?buildId=2024041900:1:55494)
    at HTMLDocument.<anonymous> (search.js?buildId=2024041900:1:57756)
    at u (commons.js?buildId=2024041900:2:154697)
    at c (commons.js?buildId=2024041900:2:154999)
value	@	search.js?buildId=2024041900:1
value	@	search.js?buildId=2024041900:1
(anonymous)	@	search.js?buildId=2024041900:1
u	@	commons.js?buildId=2024041900:2
c	@	commons.js?buildId=2024041900:2
setTimeout (async)		
T.readyException	@	commons.js?buildId=2024041900:2
(anonymous)	@	commons.js?buildId=2024041900:2
u	@	commons.js?buildId=2024041900:2
c	@	commons.js?buildId=2024041900:2
setTimeout (async)		
(anonymous)	@	commons.js?buildId=2024041900:2
l	@	commons.js?buildId=2024041900:2
fireWith	@	commons.js?buildId=2024041900:2
fire	@	commons.js?buildId=2024041900:2
l	@	commons.js?buildId=2024041900:2
fireWith	@	commons.js?buildId=2024041900:2
c	@	commons.js?buildId=2024041900:2
setTimeout (async)		
(anonymous)	@	commons.js?buildId=2024041900:2
l	@	commons.js?buildId=2024041900:2
fireWith	@	commons.js?buildId=2024041900:2
fire	@	commons.js?buildId=2024041900:2
l	@	commons.js?buildId=2024041900:2
fireWith	@	commons.js?buildId=2024041900:2
ready	@	commons.js?buildId=2024041900:2
z	@	commons.js?buildId=2024041900:2
Workaround: Do not use % symbols in the search term.

Attachment: Example .ditamap and .dita file that can be used to reproduce the issue.

Re: Search fails when a percent % symbol is used in the search term

Posted: Wed May 22, 2024 3:29 pm
by marius
Thank you for bringing the issue to our attention and for the comprehensive description you provided.
We registered a bug report with the id WH-3312, and we anticipate that the fix will be available in the next Oxygen maintenance build.
We will update this forum thread once the fix is implemented.

Best regards,
Marius

Re: Search fails when a percent % symbol is used in the search term

Posted: Tue Aug 27, 2024 1:01 pm
by beniamin_savu
Hi,

We wanted to let you know that we have released a new maintenance build for Oxygen WebHelp 26.1, which includes a fix for the issue where searching for the '%' character, along with other non-alphanumeric characters, would cause the search engine to crash.

Best regards,
Beniamin Savu
Oxygen WebHelp Team
http://www.oxygenxml.com