Hmmm… My two cents:
1. Missing quotes are fixed by Mend & Prettify, not matched quotes are removed (if one occurrence) or shredded (if two or more).
1a.
<p class='test">Blah</p>
Single occurrence -> will be removed after Mend
1b.
<p class='test">Blah</p>
<p class='test">Blah</p>
Double occurrences -> will be "fixed" by Mend to:
<p class='test">Blah</p>
<p class=' test"="">Blah</p>
1c.
Other case (unmatched inverted quotes):
<p class='test">Blah</p>
<p class="test'>Blah</p>
will be "fixed" by Mend to:
<p class='test">Blah</p>
<p class="test'>Blah</p>
2. Possible real detect missing quotes.
In sanitycheck.py after line 185:
Code:
...
val = s[b:p]
error_msg = 'Attribute "' + aname + '" has missing quotes surrounding the value'
self.errors.append((self.tag_start[0], self.tag_start[1], error_msg))
self.has_error = True
return None, None, None
tattr[aname] = val
...
I feel that this is sufficient to catch missing quotes, as the previous conditions catch other cases.
Of course, this is worth checking. Fortunately, the sanitycheck.py file is available for editing directly (C:\Program Files\Sigil\python3lib\sanitycheck.py), so the tests don't require rebuilding Sigil, just restarting it.
Of course, it's better to test it; I've only done about a dozen trials.