MantisBT - NetSurf
View Issue Details
0002596NetSurf[All Projects] Generalpublic2018-05-04 14:482018-08-29 14:59
ReporterRichard Porter 
Assigned ToMichael Drake 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformARMX6OSRISC OSOS Version5.23
Product Version3.7 
Target Version3.8Fixed in Version3.8 
Fixed in CI build #4364
Reported in CI build #4335
URL of problem pagehttps://railfuture.org.uk/conferences/#2018_reading
Summary0002596: Drag URL omits on-page part
DescriptionIf you follow a link containing an on-page reference (see problem page), then click and drag the URL to a document/editor/filer window/etc only the main part is included, not the on-page bit. So if you drag the URL of the problem page you will get https://railfuture.org.uk/conferences/ only.


Steps To ReproduceGo to problem page.
Drag the URL somewhere.
Additional InformationNot page-specific.
TagsNo tags attached.
related to 0001961closed  Allow foo.html#bar to still have the #bar when exporting URL 
Attached Files

Notes
(0001778)
Michael Drake   
2018-07-20 16:03   
For RISC OS, this happens in frontends/riscos/window.c

In ro_gui_window_toolbar_click() we call browser_window_get_url(g->bw), which is implemented by the core.


In the core, in desktop/browser.c the browser_window_get_url() function gets the URL from the current content's hlcache_handle, using hlcache_handle_get_url().

hlcache_handle_get_url() ends up either calling content_get_url(), or llcache_handle_get_url() get URL, depending on whether the content has been fetched, but content_get_url() calls llcache_handle_get_url() anyway.

The cache/fetch layers don't care about fragments which is why they don't store them.

In desktop/browser_private.h, struct browser_window is defined. It contains a member storing frag_id.

We could modify browser_window_get_url() to call nsurl_refragment(), adding the fragment back on. However, this would create a ref, and currently the browser_window_get_url() call doesn't create a ref, so that would need to change to make all call sites free the ref.
(0001825)
Vincent Sanders   
2018-08-29 14:59   
Thank you for your report, this has been resolved in the 3.8 release

Issue History
2018-05-04 14:48Richard PorterNew Issue
2018-07-20 16:03Michael DrakeDescription Updatedbug_revision_view_page.php?rev_id=2043#r2043
2018-07-20 16:03Michael DrakeSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=2045#r2045
2018-07-20 16:03Michael DrakeNote Added: 0001778
2018-07-23 11:43Michael DrakeAssigned To => Michael Drake
2018-07-23 11:43Michael DrakeStatusnew => resolved
2018-07-23 11:43Michael DrakeResolutionopen => fixed
2018-07-23 11:43Michael DrakeProduct Version => 3.7
2018-07-23 11:43Michael DrakeFixed in Version => 3.8
2018-07-23 11:43Michael DrakeTarget Version => 3.8
2018-07-23 11:43Michael DrakeFixed in CI build # => 4364
2018-07-27 10:36Vincent SandersRelationship addedrelated to 0001961
2018-08-29 14:59Vincent SandersStatusresolved => closed
2018-08-29 14:59Vincent SandersNote Added: 0001825