Open hilesaz opened 10 years ago
Looks like QTextEdit treats U+FFFC as a special character and there is no way to escape it.
Anyway, there are many special and noncharacter characters in utf8, so it makes sense to sanitize user input.
Anyway, there are many special and noncharacter characters in utf8, so it makes sense to sanitize user input.
Which spacial characters do you mean? That one listed here? http://de.wikipedia.org/wiki/Unicodeblock_Spezielles
Well, U+FFFC is used internally by QTextEdit engine and there seem to be no workaround for that.
Which spacial characters do you mean?
Like the object replacement character U+FFFC and noncharacters from the Arabic block (U+FDD0 - U+FDEF), though I'm sure there are still many others.
That one listed here? http://de.wikipedia.org/wiki/Unicodeblock_Spezielles
Can't read Deutsch, but yes, some of them.
Can't read Deutsch, but yes, some of them.
oops :D
I think the most simple fix would be to replace all "U+FFFC" inside the event with an empty string. I already have a patch for this but sending a PR will end in a (small) merge conflict with #120.
In InputTextWidget::keyPressEvent a message that starts with U+FFFC will be passed through toPlaintext normally (so not get culled) but will end up as an empty
when passed through toHtml.