Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Ocsiblog: allow fragment identifiers (#fragment) in URLs.

  • Loading branch information...
commit a32444f71d0e40de5012d07a973e16b2fa660f88 1 parent 3e9b98a
@mfp authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 ocsiblog.ml
View
4 ocsiblog.ml
@@ -69,7 +69,7 @@ let abs_service_link service ~sp desc params =
let map_body_uri ~relative ~broken ~not_relative uri =
try
- let url = Neturl.parse_url uri in
+ let url = Neturl.parse_url ~enable_fragment:true uri in
not_relative url
with Neturl.Malformed_URL -> (* a relative URL, basic verification *)
match Str.split_delim (Str.regexp "/") uri with
@@ -87,7 +87,7 @@ let render_link_aux ~link_attachment ~link_page href =
map_body_uri
~not_relative:(fun _ -> XHTML.M.a ~a:[a_href (uri_of_string uri)] [desc])
~relative:(fun page file -> link_attachment [desc] (page, file))
- ~broken:(fun _ -> desc)
+ ~broken:(fun _ -> pcdata (href.SM.href_desc ^ " (" ^ uri ^ ")"))
uri
let rec page_with_title sp thetitle thebody =
Please sign in to comment.
Something went wrong with that request. Please try again.