Just for completeness: it is possible to use bulk search/replace to clean HTML out of comments.
Step 1: create a custom template function. In my case I named it myFunc2.
The actual text of the function is
Code:
def evaluate(self, formatter, kwargs, mi, locals, t):
from calibre.utils.html2text import html2text
return html2text(t)
Then use bulk search/replace with something like the following. In this case I am changing a custom comments column, but it would work on the normal one. The custom column contains the following raw HTML:
Code:
<p class="description"><font color="#ff0000">This comment set to red text.</font></p>
Running the search replace changes it as shown in the screen capture.
I checked metadata.opf and indeed the HTML is gone.