ensure replaced msg is detected as html

Doesnt get so detected with some search expressions
This commit is contained in:
Kovid Goyal 2020-11-22 21:16:44 +05:30
parent ecb1ea36f8
commit c253825a42
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -1484,13 +1484,13 @@ def run_search(
msg = _('Performed the replacement at {num} occurrences of {query}')
else:
msg = _('Found {num} occurrences of {query}')
msg = msg.format(num=count, query=errfind)
msg = msg.format(num=count, query=prepare_string_for_xml(errfind))
det_msg = ''
if count_map is not None and count > 0 and len(count_map) > 1:
for k in sorted(count_map):
det_msg += _('{0}: {1} occurrences').format(k, count_map[k]) + '\n'
if show_diff and count > 0:
d = MessageBox(MessageBox.INFO, _('Searching done'), prepare_string_for_xml(msg), parent=gui_parent, show_copy_button=False, det_msg=det_msg)
d = MessageBox(MessageBox.INFO, _('Searching done'), '<p>'+msg, parent=gui_parent, show_copy_button=False, det_msg=det_msg)
d.diffb = b = d.bb.addButton(_('See what &changed'), d.bb.AcceptRole)
d.show_changes = False
b.setIcon(QIcon(I('diff.png'))), b.clicked.connect(d.accept)