> I have been looking around and I am not sure how to solve this > problem. Withing Evince and Xournal I am encoding any non alphanum (as > defined by the C macro) each byte that is contained in the filename > individually. > > Does anybody know which are the characters above 0 (zero) that need to > be encoded for a safe org link?
AFAIK, your current approach is correct. I think I figured it out for evince: the file name you get from evince is already URI-encoded. The attached patch fixes the problem for me, but I do not know if it is the right thing to do. I assume that the forward slashes in the file name still have to be encoded so that org-protocol is not confused; the patch disables URI-encoding for percent signs, so that already URI-encoded characters pass through unharmed. - Jan
diff --git a/libview/ev-view.c b/libview/ev-view.c index c8145ff..c575831 100644 --- a/libview/ev-view.c +++ b/libview/ev-view.c @@ -5752,7 +5752,7 @@ ev_view_previous_page (EvView *view) static gint is_unchanged_uri_char(char c) { - return isalnum(c); + return ((c == '%') || isalnum(c)); } static void encode_uri(gchar *encoded_uri, gint bufsize, const gchar *uri)
_______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode