Oxygen WebHelp problem with illegal characters in the search

Post here questions and problems related to editing and publishing DITA content.
HelenaG-P
Posts: 5
Joined: Wed Sep 11, 2013 1:14 am

Oxygen WebHelp problem with illegal characters in the search

Post by HelenaG-P »

I noticed the following problem with the search in Oxygen webhelp output that I’m building in Oxygen Author 14.2. When there is the combination of characters “\u” (Unicode escape) in the content, for example, “C:\Users” or “C:\Users”, and it gets indexed and put in one of the search index files (index-1.js, index-2.js, or index-3.js), the following exception is thrown when webhelp is loaded:

Uncaught SyntaxError: Unexpected token ILLEGAL

Then the whole search index file is invalidated, i.e. no search results will be displayed for any of the terms included in the index file that contains the illegal character combination.

Is there a way around it? Any Oxygen settings that can be used or a way to escape this combination when the index files are written, so that the JavaScript could be validated? I would even settle for excluding such expressions from indexing altogether, but haven’t come across an exclusions list for the webhelp search. If there is one, where can I find it?

Thank you.
Helena
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: Oxygen WebHelp problem with illegal characters in the se

Post by sorin_ristache »

Hi Helena,

In a later Oxygen build we fixed this bug caused by invalid JavaScript syntax in the files index-1.js, index-2.js and index-3.js. I think it was version 14.2 build number 2013040919 that fixed it. What build number do you use (you can see it in the Help -> About dialog box). Anyway if you try the latest Oxygen 15.0 build which is available now on the website the problem is fixed.

There is no exclusion list for the index that underlies the Webhelp search, so if you must continue with your Oxygen 14.2 build the simplest way around this bug would be to just remove the lines with the JavaScript syntax errors from the index files index-1.js, index-2.js and index-3.js. That will repair the search with the only cost of never returning the removed index words (like “C:\Users”) as a search result.


Regards,
Sorin
HelenaG-P
Posts: 5
Joined: Wed Sep 11, 2013 1:14 am

Re: Oxygen WebHelp problem with illegal characters in the se

Post by HelenaG-P »

Hi Sorin,

Thanks for your quick reply!

I am using the latest 14.2 build, 2013051016, and the bug is still there. But I tried Author v.15, as you suggested, and indeed there it's fixed. In v.15 the characters are escaped correctly ("\users"=>"\\users") and the index files are validated.

Many thanks for your help,
Helena
Post Reply