]> git.donarmstrong.com Git - lilypond.git/commit
Fix #887: Use ly:string-percent-encode for textedit URIs.
authorPatrick McCarty <pnorcks@gmail.com>
Sun, 24 Jan 2010 22:46:51 +0000 (14:46 -0800)
committerPatrick McCarty <pnorcks@gmail.com>
Fri, 29 Jan 2010 00:55:15 +0000 (16:55 -0800)
commit88ee66d5dd83870dad27267781b3d84386264beb
tree6e3e45d28496311d05d7b99c8f35ef25edc97b1d
parent7a68f092092cec5f0005bab83daa7bdb228bc4ab
Fix #887: Use ly:string-percent-encode for textedit URIs.

* Add an overloaded instance of String_convert::bin2hex optimized for
  converting single bytes to hex.

* Add a new callback, ly:string-percent-encode, to be used for percent
  escaping paths in textedit URIs.  This does the following:

  - Leave unreserved characters in textedit URIs unescaped.  This
    includes 0-9, A-Z, a-z, and three punctuation characters (hyphen,
    underscore, and full-stop).

  - Leave the forward slash (/) unescaped, since it is used as a path
    delimiter.

  - Escape all other characters.  Don't check for a null byte, since
    those likely won't sneak into a full pathname.

* Use the callback function in the PS backend.
flower/include/string-convert.hh
flower/string-convert.cc
lily/general-scheme.cc
scm/output-ps.scm