summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 77c151f)
raw | patch | inline | side by side (parent: 77c151f)
author | joncruz <joncruz@users.sourceforge.net> | |
Tue, 29 Sep 2009 21:10:10 +0000 (21:10 +0000) | ||
committer | joncruz <joncruz@users.sourceforge.net> | |
Tue, 29 Sep 2009 21:10:10 +0000 (21:10 +0000) |
src/color-profile.cpp | patch | blob | history |
diff --git a/src/color-profile.cpp b/src/color-profile.cpp
index 9b05aaa7efdd3f8d52c39445e5e59be89ebc57ef..4b13073165b088e5b208e44e60c9b42ae6566bfb 100644 (file)
--- a/src/color-profile.cpp
+++ b/src/color-profile.cpp
// Normal for files that have not yet been saved.
docbase = "";
}
+
+ gchar* escaped = g_uri_escape_string(cprof->href, "!*'();:@=+$,/?#[]", TRUE);
+
//g_message("docbase:%s\n", docbase);
org::w3c::dom::URI docUri(docbase);
//# 2. Get href of icc file. we don't care if it's rel or abs
- org::w3c::dom::URI hrefUri(cprof->href);
+ org::w3c::dom::URI hrefUri(escaped);
//# 3. Resolve the href according the docBase. This follows
// the w3c specs. All absolute and relative issues are considered
org::w3c::dom::URI cprofUri = docUri.resolve(hrefUri);
- gchar* fullname = g_strdup((gchar *)cprofUri.getNativePath().c_str());
+ gchar* fullname = g_uri_unescape_string(cprofUri.getNativePath().c_str(), "");
cprof->_clearProfile();
cprof->profHandle = cmsOpenProfileFromFile( fullname, "r" );
if ( cprof->profHandle ) {
#ifdef DEBUG_LCMS
DEBUG_MESSAGE( lcmsOne, "cmsOpenProfileFromFile( '%s'...) = %p", fullname, (void*)cprof->profHandle );
#endif // DEBUG_LCMS
+ g_free(escaped);
+ escaped = 0;
g_free(fullname);
#endif // ENABLE_LCMS
}