Page 1 of 1
Issue with '#' in webhelp URL
Posted: Wed Sep 09, 2015 11:28 am
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
Re: Issue with '#' in webhelp URL
Posted: Thu Sep 10, 2015 4:09 pm
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
Re: Issue with '#' in webhelp URL
Posted: Fri Sep 11, 2015 4:06 pm
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.
Re: Issue with '#' in webhelp URL
Posted: Fri Sep 11, 2015 5:04 pm
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
Re: Issue with '#' in webhelp URL
Posted: Thu Oct 01, 2015 5:46 pm
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.
Re: Issue with '#' in webhelp URL
Posted: Fri Oct 02, 2015 4:45 pm
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
Re: Issue with '#' in webhelp URL
Posted: Thu Nov 19, 2015 11:02 am
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.
any idea?
regards,
rnrrnv
Re: Issue with '#' in webhelp URL
Posted: Fri Nov 20, 2015 11:30 am
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
Re: Issue with '#' in webhelp URL
Posted: Fri Nov 20, 2015 2:54 pm
by rnvrnv
thank you for your response.