diff --git a/contrib/smjs/hooks.js b/contrib/smjs/hooks.js index d4516c715..0278e46f2 100644 --- a/contrib/smjs/hooks.js +++ b/contrib/smjs/hooks.js @@ -55,7 +55,14 @@ function mangle_deb_bugnumbers(cached, vs) { /* Debian Policy Manual 4.4 footnote 16 */ var closes_re = /closes:\s*(?:bug)?\#?\s?\d+(?:,\s*(?:bug)?\#?\s?\d+)*/gi; - cached.content = cached.content.replace(closes_re, rewrite_closes_fn); + var new_content = cached.content.replace(closes_re, rewrite_closes_fn); + if (cached.content_type == 'text/plain') { + cached.content = '
' + new_content + '
'; + vs.plain = "0"; + } else { + cached.content = new_content; + } + return true; }