| Summary: | links to html anchor on the same page (with # at the end) are reported as broken | ||
|---|---|---|---|
| Product: | [Unmaintained] klinkstatus | Reporter: | Petr Sodomka <pesmail2003> |
| Component: | general | Assignee: | Paulo Moura Guedes <kde> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Ubuntu | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Petr Sodomka
2006-09-19 15:00:07 UTC
BTW, is this RFC? The browsers I tested act on it jumping to the top of the page but I found nothing on w3.org. It is the same as "#top"? What else is commonly used? SVN commit 587660 by mojo:
BUG: 134329
Accept fragment identifiers like "#" and "#top".
M +9 -1 linkchecker.cpp
--- branches/KDE/3.5/kdewebdev/klinkstatus/src/engine/linkchecker.cpp #587659:587660
@@ -505,6 +505,14 @@
{
KURL url(linkStatus()->absoluteUrl());
Q_ASSERT(url.hasRef());
+
+ QString ref = url.ref();
+ if(ref == "" || ref == "top") {
+ linkstatus_->setStatus("OK");
+ finnish();
+ return;
+ }
+
QString url_base;
LinkStatus const* ls_parent = 0;
int i_ref = -1;
@@ -535,7 +543,7 @@
void LinkChecker::checkRef(KURL const& url)
{
Q_ASSERT(search_manager_);
-
+
QString url_string = url.url();
KHTMLPart* html_part = search_manager_->htmlPart(url_string);
if(!html_part)
|