[Webkit-unassigned] [Bug 78339] New: [GTK] KURL::fileSystemPath() doesn't work if uri contains #
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Feb 10 01:52:08 PST 2012
https://bugs.webkit.org/show_bug.cgi?id=78339
Summary: [GTK] KURL::fileSystemPath() doesn't work if uri
contains #
Product: WebKit
Version: 528+ (Nightly build)
Platform: PC
OS/Version: Linux
Status: NEW
Severity: Normal
Priority: P2
Component: WebKit Gtk
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: cgarcia at igalia.com
CC: xan.lopez at gmail.com, gns at gnome.org,
pnormand at igalia.com
The problem is that KURL::fileSystemPath() uses g_filename_from_uri() to convert the uri to a local path. g_filename_from_uri() doesn't allow uris containing #, returning NULL in that case with a G_CONVERT_ERROR_BAD_URI error.
In WebKit2, when html has been loaded from a string with loadHTML(), all relative paths must be relative to the baseURL passed to loadHTML(). To check whether a relative path is in the same directory than the baseURL, both are converted to local path. If the relative path contains a # KURL::fileSystemPath() returns an empty String and the condition is always false, making the web process to terminate.
The solution is using GFile instead of g_filename_from_uri(), since GFile removes the anchor from the uri when converting the uri to a local path.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list