Support backslashes in topics of HTML help files
HTML help file is a Microsoft format and it makes sense to support backslashes in the file names used in it. Closes https://github.com/wxWidgets/wxWidgets/pull/244
This commit is contained in:
parent
db70be1a7c
commit
d96a25be12
@ -229,7 +229,10 @@ bool HP_TagHandler::HandleTag(const wxHtmlTag& tag)
|
||||
if (m_name.empty() && tag.GetParam(wxT("NAME")) == wxT("Name"))
|
||||
m_name = tag.GetParam(wxT("VALUE"));
|
||||
if (tag.GetParam(wxT("NAME")) == wxT("Local"))
|
||||
m_page = tag.GetParam(wxT("VALUE"));
|
||||
{
|
||||
m_page = tag.GetParam(wxT("VALUE"));
|
||||
m_page.Replace("\\", "/");
|
||||
}
|
||||
if (tag.GetParam(wxT("NAME")) == wxT("ID"))
|
||||
tag.GetParamAsInt(wxT("VALUE"), &m_id);
|
||||
return false;
|
||||
@ -683,7 +686,10 @@ bool wxHtmlHelpData::AddBook(const wxString& book)
|
||||
if (wxStrstr(linebuf, wxT("title=")) == linebuf)
|
||||
title = linebuf + wxStrlen(wxT("title="));
|
||||
if (wxStrstr(linebuf, wxT("default topic=")) == linebuf)
|
||||
start = linebuf + wxStrlen(wxT("default topic="));
|
||||
{
|
||||
start = linebuf + wxStrlen(wxT("default topic="));
|
||||
start.Replace("\\", "/");
|
||||
}
|
||||
if (wxStrstr(linebuf, wxT("index file=")) == linebuf)
|
||||
index = linebuf + wxStrlen(wxT("index file="));
|
||||
if (wxStrstr(linebuf, wxT("contents file=")) == linebuf)
|
||||
|
Loading…
Reference in New Issue
Block a user