summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-reader/striphtml.cpp
Side-by-side diff
Diffstat (limited to 'noncore/apps/opie-reader/striphtml.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-reader/striphtml.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/apps/opie-reader/striphtml.cpp b/noncore/apps/opie-reader/striphtml.cpp
index c434dbb..a2ad56b 100644
--- a/noncore/apps/opie-reader/striphtml.cpp
+++ b/noncore/apps/opie-reader/striphtml.cpp
@@ -428,97 +428,97 @@ QString striphtml::getattr(tchar& ch)
unsigned long pos;
if (ch == ' ') ch = skip_ws();
if (ch == '=')
{
ch = skip_ws();
if (ch == '"')
{
mygetch(ch, sty, pos);
ref = getname(ch, "\"");
ch = skip_ws();
}
else if (ch == '\'')
{
mygetch(ch, sty, pos);
ref = getname(ch, "\'");
ch = skip_ws();
}
else
{
ref = getname(ch, " >");
if (ch == ' ') ch = skip_ws();
}
}
return ref;
}
linkType striphtml::hyperlink(unsigned int n, unsigned int, QString& w, QString& nm)
{
#if defined(USEQPE) || defined(_WINDOWS)
QMap<unsigned long, QString>::Iterator hrefit = id2href->find(n);
#else
QMap<unsigned long, QString>::iterator hrefit = id2href->find(n);
#endif
if (hrefit == id2href->end())
{
return eNone;
}
QString href = *hrefit;
#if defined(USEQPE) || defined(_WINDOWS)
QMap<QString, unsigned long>::Iterator fpit = href2filepos->find(href);
#else
QMap<QString, unsigned long>::iterator fpit = href2filepos->find(href);
#endif
if (fpit == href2filepos->end())
{
if (href == "history.back()")
{
QString fc = currentfile;
- unsigned long loc;
+ unsigned long loc = 0;
htmlmark m(fc, loc);
linkType ret = (m_nav.back(m)) ? eFile : eNone;
if (fc == m.filename())
{
if ((ret & eFile) != 0)
{
locate(m.posn());
return eLink;
}
}
return eNone;
}
qDebug("Searching for %s", (const char*)href);
QString file, name;
int colon = href.find('#');
if (colon >= 0)
{
file = dehtml(href.left(colon));
name = dehtml(href.right(href.length()-colon-1));
}
else
{
file = dehtml(href);
}
qDebug("File:%s", (const char*)file);
qDebug("Name:%s", (const char*)name);
if (file.isEmpty())
{
if (parent->findanchor(name))
{
reset();
return eLink;
}
fpit = href2filepos->find(name);
if (fpit != href2filepos->end())
{
locate(*fpit);
return eLink;
}
else
{
// nm = QString("<a[^>]*name[ \t]*=[ \t]*\"") + name + "\"";