Search fails when a percent % symbol is used in the search term
Posted: Tue May 21, 2024 10:31 pm
Given I have a topic containing a Windows-based variable path such as:
Code: Select all
%userprofile%
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
Attachment: Example .ditamap and .dita file that can be used to reproduce the issue.