ToDo List View with unreadable Description

The list view of ToDo doctype is unreadable. When opening the List View of the ToDo Doctype, the “Description” fields of every entry looks like this:

[<div class="ql-editor read-mode">
[<div class="ql-editor read-mode">
[<div class="ql-editor read-mode">

This makes the ToDo list unusable (if used as such).

Installed Apps

ERPNext: v14.x.x-develop () (develop)
Frappe Framework: v15.x.x-develop () (develop)
Frappe Insights: v1.1.3 (develop)
Frappe LMS: v1.0.0 (main)

This seems to be a bug.

My other, v14 ERPNext instance works fine, it has these versions:
ERPNext: v14.30.1
Frappe Framework: v14.40.3

1 Like

Same here … It happens only for the tasks created from CRM module. If it’s a normal task then it works fine.

Hi:

Issue raised here:

2 Likes

Hi,

I’m facing the same here.

Options are

  • to make an app that add a new field let’s call it “title” type Data, set this field as “subject_field” and “title_field” with property setters in the Doctype ToDo, and in hook.py of the app use a method on validate of ToDo Doctype that will use frappe.utils.strip_html_tags and “truncate” to fill this field, and after_install make a script that populate this “title” field with the same rule as on validate
  • make a PR on github with the same code
  • make a PR on github that somewhere in frappe/public/js/frappe/list/base_list.js use similar frappe/public/js/frappe/ui/page.js method set_title strip_html on field of HTML type to render them

I’m willing to do one of them, just wonder what is the best way ?

1 Like

This way sounds good to me …

For this solution, I’m not able to do it for now, but I’m ok, it will be the better one.
May be Frappe team will take action in that direction as you’ve open as Issue on Github

Hi @FHenry @Peer :

Seems it will be fixed here, finally adding a subject_field (your first approach, @FHenry )

1 Like

Yes and barredterra suggest the 3rd option, and we are agree with him.
Let’s see what happen from Frappe team.

1 Like

The PR from Frappe Team is here

Translations:

EN: No Text Found in Description
DE: Kein Text in Beschreibung
FR: Description sans texte

Note:
EN - the word “Found” is not necessary.

Thank you!

Hi @Peer Did you get any update on this?

What do you mean by “this”?

The issue of post 1 of this thread was quickly resolved with a PR.

If the translations provided (see above) where integrated I don’t know, but an empty description prevents the ToDo form to be saved, so it probably can’t exist unless by direct database manipulation.

Maybe you found a similar behavior elsewhere in the ERPNext or Frappe app. At least I did, (but didn’t raise anything, so far at least, because it didn’t hamper me like the title bug of this thread). This can happen of course, because it’s just one aspect of a wider use case collection most any feature does have, so, as something might simply get overlooked during dev work, it might be useful to raise a PR, bug report or so.

I mean, whenever I create a todo and give some description,
It’s look like this in the list view

It looked like this originally, indeed.

Maybe you have an older version (from before the fix), and
it wasn’t backported / updated, or
it reappeared due to some other change / refactoring / …

Stripping code from a mixture of data and code is always a tricky and even dangerous thing. It sits right at the border of secure vs. vulnerable.

On one hand you want to provide the user with nice functionality (e.g. text formatting), so the formatting must be stored somehow (in the database).

On the other hand, html tends to evolve and include more and more stuff (especially JS code bits), and if the stripping of the formatting isn’t done perfectly all the time (over the evolving time, and including the relevant libraries to manipulate the byte streams), you can easily introduce a “stored XSS” vulnerability, by any oversight.

So it might seem easier to a dev to just output the code (html) with the entered user data by using some “safe display” library function which just renders the html safely, as compared to correctly stripping of the code from the byte stream in the field with another library function.
So here we are in the field of “software supply chain”, “software BOM” and the communication of vulnerabilities as well as knowledge and awareness of the possible issues for users, usability and use cases, in a quickly evolving world wide software ecosystem.

1 Like