|
From: | Richard Shann |
Subject: | Invalid SVG generation for filenames that have quotes embedded. |
Date: | Thu, 11 Feb 2016 14:51:18 +0000 (UTC) |
User-agent: | Loom/3.14 (http://gmane.org/) |
In output-svg.scm this bit of code: (ly:format "<a style=\"color:inherit;\" xlink:href=\"textedit://~a:~a:~a:~a\">\n" ;; Backslashes are not valid ;; file URI path separators. (ly:string-percent-encode (ly:string-substitute "\\" "/" file)) (cadr location) (caddr location) (1+ (cadddr location))) generates invalid xml if the file name file includes double quotes. It should escape them thus: (ly:format "<a style=\"color:inherit;\" xlink:href=\"textedit://~a:~a:~a:~a\">\n" ;; Backslashes are not valid ;; file URI path separators. (ly:string-percent-encode (ly:string-substitute "\"" "\\\" (ly:string-substitute "\\" "/" file))) (cadr location) (caddr location) (1+ (cadddr location))) This is a real problem for code (Denemo) which uses these links to do more sophisticated things than just pass back a file name and location.
[Prev in Thread] | Current Thread | [Next in Thread] |