@@ -616,9 +616,9 @@ function span_renderers.link(sp,b,s) local href if b.origin.doc.sections[sp.ref] then - href = '#' .. sp.ref + href = '#' .. getSafeID(sp) else if sp.addr then href = sp.addr else local r = b.origin:ref(sp.ref) if type(r) == 'table' then