Quote:
Originally Posted by BeckyEbook
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\SigilBE\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.
|
You mean line 185 after my proposed PR changes, right? If so, I agree.