Bug 424188 - Account names only display partially on Home View
Summary: Account names only display partially on Home View
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: 5.1.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-14 11:17 UTC by Mark Medoff
Modified: 2020-07-19 15:50 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 5.1.1
Sentry Crash Report:


Attachments
Account names only display partially on Home View (13.29 KB, image/png)
2020-07-14 11:17 UTC, Mark Medoff
Details
attachment-28525-0.html (2.17 KB, text/html)
2020-07-19 09:55 UTC, Mark Medoff
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Medoff 2020-07-14 11:17:26 UTC
Created attachment 130111 [details]
Account names only display partially on Home View

SUMMARY
I have several account names that display properly on Account view but only partially on Home view. The names do have the characters < > in them but other names with these characters display correctly.

STEPS TO REPRODUCE
1. view account in Accounts view
2. view account in Home view
3. 

OBSERVED RESULT
Only part of name appears in Home view. In accounts view and when I edit account, name displays correctly

EXPECTED RESULT
Same name should display everywhere

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
For example, ACCOUNT NAME = Fidelity <ETF> . Home view displays NAME = Fidelity .
Comment 1 Jack 2020-07-19 00:05:00 UTC
First, your example screenshot is not helpful, as I have no idea what those account names are supposed to be.  However, I believe this is because the Home View is essentially implemented with HTML, and the angle brackets are interpreted as some tag it doesn't know about, and so just dropped.  If the name is "name with &lt;stuff in brackets&gt; yao." it will appear on the home page as "name with <stuff in brackets> yao" but then the literal &gt; etc will show up everywhere else, which is obviously not a solution.  I suppose it would be possible for the program to properly quote any character with special meaning to HTML on the home page.
Comment 2 Mark Medoff 2020-07-19 09:55:20 UTC
Created attachment 130233 [details]
attachment-28525-0.html

The bug report wouldn't let me send 2 screenshots, the second showing the
actual account names.
I played with it a little more and found that if I have numbers inside the
brackets, the account names appear correctly in the home view.
If I have text inside the brackets, all text in the brackets is
dropped, regardless of what other characters are in the text.

I think the best solution is to give a warning when a user puts brackets in
an account name, that the brackets are a reserved character and can't be
used in account names. Now that I know they cause problems, it is easy to
select a different character to denote what I wanted to denote with them.

Thanks,
Mark

On Sat, Jul 18, 2020 at 8:05 PM Jack <bugzilla_noreply@kde.org> wrote:

> https://bugs.kde.org/show_bug.cgi?id=424188
>
> --- Comment #1 from Jack <ostroffjh@users.sourceforge.net> ---
> First, your example screenshot is not helpful, as I have no idea what those
> account names are supposed to be.  However, I believe this is because the
> Home
> View is essentially implemented with HTML, and the angle brackets are
> interpreted as some tag it doesn't know about, and so just dropped.  If the
> name is "name with &lt;stuff in brackets&gt; yao." it will appear on the
> home
> page as "name with <stuff in brackets> yao" but then the literal &gt; etc
> will
> show up everywhere else, which is obviously not a solution.  I suppose it
> would
> be possible for the program to properly quote any character with special
> meaning to HTML on the home page.
>
> --
> You are receiving this mail because:
> You reported the bug.
Comment 3 Thomas Baumgart 2020-07-19 15:08:20 UTC
Git commit 5ce752748e70f66bfbf65cb93196b286971a6fe0 by Thomas Baumgart.
Committed on 19/07/2020 at 15:07.
Pushed by tbaumgart into branch '5.1'.

Show complete account names when they have '<' in their name

When an account name contains the less-than character followed by text,
that part is removed from the name in HTML based views (home view and
reports).

Escaping the less-than and greater-than characters to their HTML
equivalent solves the problem and all of the name is displayed.
FIXED-IN: 5.1.1

M  +2    -2    kmymoney/plugins/views/reports/core/pivottable.cpp
M  +1    -1    kmymoney/views/khomeview_p.h

https://invent.kde.org/office/kmymoney/commit/5ce752748e70f66bfbf65cb93196b286971a6fe0
Comment 4 Thomas Baumgart 2020-07-19 15:50:23 UTC
Git commit 0bb579cef2733b05d131ab73a6ae36158b3b573e by Thomas Baumgart.
Committed on 19/07/2020 at 15:50.
Pushed by tbaumgart into branch 'master'.

Show complete account names when they have '<' in their name

When an account name contains the less-than character followed by text,
that part is removed from the name in HTML based views (home view and
reports).

Escaping the less-than and greater-than characters to their HTML
equivalent solves the problem and all of the name is displayed.

(cherry picked from commit 5ce752748e70f66bfbf65cb93196b286971a6fe0)

M  +2    -2    kmymoney/plugins/views/reports/core/pivottable.cpp
M  +1    -1    kmymoney/views/khomeview_p.h

https://invent.kde.org/office/kmymoney/commit/0bb579cef2733b05d131ab73a6ae36158b3b573e