Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning: Can't locate... when clicking on a web link #353

Open
GoogleCodeExporter opened this issue Aug 12, 2015 · 3 comments
Open

Warning: Can't locate... when clicking on a web link #353

GoogleCodeExporter opened this issue Aug 12, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

Which steps will reproduce the problem?
 1. Load an HTML viewer with the following text:
    <a href="http://en.wikipedia.org/wiki/Floating_point">
    http://en.wikipedia.org/wiki/Floating_point</a><br>
    <a href="http://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html">
    http://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html</a>
 2. Start the program and click the first link. As no method has been defined
    for the link clicking, nothing happens. That's fine.
 3. Click the second link. By some reason, the message 'Can't locate' (plus
    the http link text preceded by the current folder) appears.

What is the expected output?
 4. I would expect the same as with the first link - that NOTHING happens.

Which version of the product are you using?
  HTMLView 11.4

Which compiler version are you using?
  Delphi XE2

On which operating system?
  Windows 7, 64bit

Original issue reported on code.google.com by [email protected] on 18 May 2014 at 7:28

Attachments:

@GoogleCodeExporter
Copy link
Author

Andreas, 

the THtmlViewer component handles file names only and does not know anything 
about protocols like http:. That's why the built-in default click handler 
expands the second file name with the base path of the loaded document and - of 
course - fails to load it. 

The first link is ignored as it has no "file" extension and won't be opened 
even if it were a HTML document. THtmlViewer only tries to load [X]HTML 
documents, text files and images. The types are identified by file extension. 
In procedure HtmlViewer.InitFileTypes you can find a list of recognized file 
extensions.

I'd prefer not to take action on this behaviour before version 11.5 is 
released. After that it is planned to unify the document loading methods of 
THtmlViewer, TFrameViewer and TFrameBrowser and add pluggable protocol 
handlers. The the message would be something like 'Cannot load "<url>". No 
handler for protocol "<protocol>" found in "<list of supported protocols>"'.

A more sophisticated document type detection would be nice, too.

OrphanCat

Original comment by OrphanCat on 26 May 2014 at 6:54

  • Changed state: Accepted
  • Added labels: Milestone-Release11.6, Priority-Low
  • Removed labels: Priority-Medium

@GoogleCodeExporter
Copy link
Author

Original comment by OrphanCat on 10 Jun 2015 at 8:33

  • Added labels: Milestone-afterRelease11.6
  • Removed labels: Milestone-Release11.6

@GoogleCodeExporter
Copy link
Author

Original comment by OrphanCat on 10 Jun 2015 at 8:34

  • Added labels: Milestone-After11.6
  • Removed labels: Milestone-afterRelease11.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant