* Added send-url/file that consumes a path and adds the file://, use
that in places that show docs. * Made send-url quote characters that are possibly dangerous for subprocesses (good uses should call it wil already quoted urls). Also a keyword argument that can disable this, if someone really wants to. * IE7 bug workaround finally working (but will need to switch from regedit to mred, to avoid vista warning). svn: r8467 original commit: dbd27dafc66d0b94924e4287e60bdb3903fad215
This commit is contained in:
parent
c2788702f8
commit
e2e36b404e
|
@ -18,11 +18,10 @@
|
|||
[send-main-page (-> void?)])
|
||||
|
||||
(define (send-main-page)
|
||||
(let ([user-dest-path (build-path (find-user-doc-dir) "index.html")]
|
||||
[dest-path (build-path (find-doc-dir) "index.html")])
|
||||
(send-url (format "file://~a" (path->string (if (file-exists? user-dest-path)
|
||||
user-dest-path
|
||||
dest-path))))))
|
||||
(let* ([path (build-path (find-user-doc-dir) "index.html")]
|
||||
[path (if (file-exists? path)
|
||||
path (build-path (find-doc-dir) "index.html"))])
|
||||
(send-url/file path)))
|
||||
|
||||
;; if there is exactly one exact match for this search key, go directly
|
||||
;; to that place. Otherwise, go to a page that lists all of the matches.
|
||||
|
@ -40,9 +39,7 @@
|
|||
[else
|
||||
(let ([match (car exact-matches)])
|
||||
(let-values ([(path tag) (xref-tag->path+anchor x (entry-tag match))])
|
||||
(send-url (format "file://~a~a"
|
||||
(path->string path)
|
||||
(if tag (string-append "#" (uri-encode tag)) "")))))])))
|
||||
(send-url/file path #:fragment (uri-encode tag))))])))
|
||||
|
||||
(define (generate-search-results search-keys)
|
||||
(let ([file (next-search-results-file)]
|
||||
|
@ -75,7 +72,7 @@
|
|||
(build-itemization "Exact matches" exact-matches)
|
||||
(build-itemization "Containing matches" inexact-matches))]))))
|
||||
file)
|
||||
(send-url (format "file://~a" (path->string file)))
|
||||
(send-url/file file)
|
||||
(void))))
|
||||
|
||||
(define (make-extra-content desc)
|
||||
|
|
Loading…
Reference in New Issue
Block a user