Issue with '#' in webhelp URL

Having trouble installing Oxygen? Got a bug to report? Post it all here.
rnvrnv
Posts: 17
Joined: Wed Sep 09, 2015 11:07 am

Issue with '#' in webhelp URL

Post by rnvrnv »

hi,

Webhelp URLs contain character '#'. eg: file:///C:/data/webhelp_out/X00000682.html#X00000777.html

Our webserver has issue with '#' and removes everything in the URL after '#'

we need to encode '#' with '%23'.

Will appreciate what we need do so that in the URL '#' is encoded with '%23'. I guess it should be done in some js file.

regards,
rnv
bogdan_cercelaru
Posts: 222
Joined: Tue Jul 01, 2014 11:48 am

Re: Issue with '#' in webhelp URL

Post by bogdan_cercelaru »

Hello,
rnvrnv wrote: Webhelp URLs contain character '#'. eg: file:///C:/data/webhelp_out/X00000682.html#X00000777.html

Our webserver has issue with '#' and removes everything in the URL after '#'
If you access the WebHelp pages using file:, protocol than you don't use a webserver. Probably your browser removes that part of the URL when HTML pages are accessed locally.
Please let us know what browser and what operating system are you using.

Please try to use an HTTP server (e.g. XAMPP) to test if it works fine.

Regards,
Bogdan
Bogdan Cercelaru
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
rnvrnv
Posts: 17
Joined: Wed Sep 09, 2015 11:07 am

Re: Issue with '#' in webhelp URL

Post by rnvrnv »

the URL i specified is only as an example to show '#' in the URL. our published document is hosted in a webserver where users needs to login. but it does not support '#' and must be encoded.
bogdan_cercelaru
Posts: 222
Joined: Tue Jul 01, 2014 11:48 am

Re: Issue with '#' in webhelp URL

Post by bogdan_cercelaru »

Hello,

Please let us know your browser and operating system to try to reproduce the issue. The "#" caracter has nothing to do with the web server because it is not sent to the server. It is processed on the client side.

Regards,
Bogdan
Bogdan Cercelaru
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
rnvrnv
Posts: 17
Joined: Wed Sep 09, 2015 11:07 am

Re: Issue with '#' in webhelp URL

Post by rnvrnv »

sorry for the late response.

I should have been more specific. actually our authentication service does not allowing '#'. If a user is not logged in, the request first goes to the authentication server. once the user is verified successfully the server actually redirects URL to the webserver. However since '#' is not allowed anything after '#' in the URL is not sent. Therefore, for the first time URL is redirected to the main page. once the user is authenticated then it is not an issue.
bogdan_cercelaru
Posts: 222
Joined: Tue Jul 01, 2014 11:48 am

Re: Issue with '#' in webhelp URL

Post by bogdan_cercelaru »

Hello,

Depending on your server setup, the authentication server (page) should support a parameter for redirecting back to the original URL (including the escaped anchors) after the authentication succeeded. The authentication server should be able to decode the encoded "#".
e.g.: Going to

Code: Select all

http://www.auth-server.com/auth.html?redirect.url=http://www.oxygenxml.com/doc/ug-editor/index.html%23topics/copyright.html
without being authenticated, should redirect you to

Code: Select all

http://www.oxygenxml.com/doc/ug-editor/index.html#topics/copyright.html
after authentication succeeded.

Regards,
Bogdan
Bogdan Cercelaru
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
rnvrnv
Posts: 17
Joined: Wed Sep 09, 2015 11:07 am

Re: Issue with '#' in webhelp URL

Post by rnvrnv »

Hi Bogdan,

I have no influence on authentication server. I just got info it is not supported and we need to avoid it. :cry:

any idea?

regards,
rnrrnv
bogdan_cercelaru
Posts: 222
Joined: Tue Jul 01, 2014 11:48 am

Re: Issue with '#' in webhelp URL

Post by bogdan_cercelaru »

Hello,

The current implementation needs the "#" character in the WebHelp URL to load the requested topic in the right section of the page.
Unfortunately, you cannot avoid the use of the "#" character in the URL.

Regards,
Bogdan
Bogdan Cercelaru
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
rnvrnv
Posts: 17
Joined: Wed Sep 09, 2015 11:07 am

Re: Issue with '#' in webhelp URL

Post by rnvrnv »

thank you for your response.
Post Reply