@@ -411,7 +411,10 @@ convertWithOpts opts = do
411 selfcontain = if optSelfContained opts && htmlFormat
411 selfcontain = if optSelfContained opts && htmlFormat
412 then makeSelfContained writerOptions
412 then makeSelfContained writerOptions
413 else return
413 else return
414− handleEntities = if htmlFormat && optAscii opts
414+ handleEntities = if (htmlFormat ||
415+ format == "docbook4" ||
416+ format == "docbook5" ||
417+ format == "docbook") && optAscii opts
415 then toEntities
418 then toEntities
417 output <- f writerOptions doc'
420 output <- f writerOptions doc'