Skip to content
Commit 84a0d9b2 authored by Stefan Brüns's avatar Stefan Brüns
Browse files

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
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment