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

Having trouble installing Oxygen XML WebHelp? Got a bug to report? Post it all here.
adorney1
Posts: 1
Joined: Tue May 21, 2024 10:10 pm

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

Post 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.
You do not have the required permissions to view the files attached to this post.
marius
Posts: 52
Joined: Thu Mar 05, 2009 11:44 am

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

Post 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
Marius Ciolacu
Syncro Soft / Oxygen XML
beniamin_savu
Posts: 38
Joined: Fri Jan 22, 2021 11:05 am

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

Post 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
Post Reply