Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Ocsiblog: img src checking in node body.

  • Loading branch information...
commit 0f57fd9aabf3475d5d7de4732c30ddf5c19bf833 1 parent 64899ac
mfp authored

Showing 1 changed file with 9 additions and 3 deletions. Show diff stats Hide diff stats

  1. +9 3 ocsiblog.ml
12 ocsiblog.ml
@@ -256,9 +256,15 @@ and render_pre sp ~kind txt = match kind with
256 256 | _ -> pre [code [pcdata txt]]
257 257
258 258 and render_img sp img =
259   - XHTML.M.img
260   - ~a:[a_class ["centered"]]
261   - ~src:(uri_of_string img.SM.img_src) ~alt:img.SM.img_alt ()
  259 + let mk_img src alt = XHTML.M.img ~a:[a_class ["centered"]] ~src ~alt () in
  260 + map_body_uri
  261 + ~relative:(fun p f ->
  262 + mk_img
  263 + (make_uri ~service:!!attachment_service ~sp (p, f))
  264 + img.SM.img_alt)
  265 + ~not_relative:(fun _ -> mk_img (uri_of_string img.SM.img_src) img.SM.img_alt)
  266 + ~broken:pcdata
  267 + img.SM.img_src
262 268
263 269 and render_link sp href =
264 270 render_link_aux

0 comments on commit 0f57fd9

Please sign in to comment.
Something went wrong with that request. Please try again.