Do not mangle angle brackets in value widgets
Summary: When some value contains a opening angle bracket "<", any enclosed text up to the closing ">" is removed from the value. The mangling only happened for files which are readonly, making the behavior even more awkward. As any text properties a always plain text, remove the stripping also for readonly files. Depends on D25238 The stripping in the ValueWidget sizeHint is broken as well, in case the value is PlainText, it would strip regular text from the size calculation (creating a too narrow widget), for RichText the sizeHint without stripping is too wide, but the layout engine wraps the content correctly (it's a hint, after all). As there are no users for the plainText function left, remove it. Test Plan: To expose the broken behavior: # Create a document (.odt, html) with a '<' in e.g. the Title # Make the file readonly -> everything after '<' vanishes With the fix, the content is fully kept. Reviewers: #baloo, ngraham, astippich Reviewed By: #baloo, ngraham Tags: #baloo Differential Revision: https://phabricator.kde.org/D25239
parent
0dacef04
Please register or sign in to comment