CleanHelpPath & index.html

From: Andreas 'ads' Scherbaum <adsmail(at)wars-nicht(dot)de>
To: pgadmin-hackers(at)postgresql(dot)org
Subject: CleanHelpPath & index.html
Date: 2016-01-06 21:47:54
Message-ID: 568D8B8A.10804@wars-nicht.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers


Hi,

looking into misc.cpp, around line 661, there is CleanHelpPath. When I
try to add a documentation link ending with "index.html", this function
incorrectly assumes that it must be a directory and adds a "/" (or
whatever the current separator is).

This even happens when the correct link is in ~/.pgadmin3. The link is
then read from the config file, cleaned up incorrectly and when I try to
open the help link, it points to the wrong URL (index.html/).

Attached is a small patch which checks a string in CleanHelpPath if it
ends in one of the most common file types (.htm, .html, .php and .asp)
and if this is the case, the string is returned as is.

Regards,

--
Andreas 'ads' Scherbaum
German PostgreSQL User Group
European PostgreSQL User Group - Board of Directors
Volunteer Regional Contact, Germany - PostgreSQL Project

Attachment Content-Type Size
misc.diff text/x-patch 1.7 KB

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Ashesh Vashi 2016-01-07 03:09:07 pgAdmin 4 commit: Adding Select2Cell, which uses select2.
Previous Message Ashesh Vashi 2016-01-06 13:51:10 pgAdmin 4 commit: Resolved an issue in the sesion tracking, and generat