Our flexible Kanban board for managing tasks with drag drop


Post by ahelis »

Bryntum TaskBoard 5.0.6

Sorry for the repetition if this has been asked and answered already. I did search the forum but did not find a similar topic.

In one configuration of the board, we display people as the columns. When a person's name contains a single quotation mark, like O'Reilly and O'Malley, the board is double encoding the single quotation mark. On the first pass it converts (') to (') and on the second pass it converts (') to (') which renders as ('). We have tested using each of the characters in the code snippet below and have observed the same double encoding issue.

Looking into the code there is a method:

static initHtmlEntities(mappings) {
    mappings = mappings || {
      '&': '&',
      '>': '>',
      '<': '&lt;',
      '"': '&quot;',
      "'": '&#39;'
    };
    ...

This looks like a simple bug. If the double encoding is changed to single encoding, then it will display the special characters correctly when rendered into the column names.

If this is not a bug, or you have specific reason to double encode special characters, is there a way to override this behavior, via configuration? The method initHtmlEntities() takes an argument mappings, but I could not find a place where you allow this argument to be passed.

The screen shot shows a double quotation mark in the data for the column. When debugging, the column model contains "aTodoOwner, a but when you render to the DOM, the problem happens.

Observed the same behavior for the following characters:
single quotation mark
double quotation mark
ampersand
greater than
less than

Screen Shot 2022-07-12 at 3.32.35 PM.png
Screen Shot 2022-07-12 at 3.32.35 PM.png (464.09 KiB) Viewed 593 times

Post by alex.l »

Looks like a bug, I've opened a ticket to fix that https://github.com/bryntum/support/issues/4923
Thank you for the report!

All the best,
Alex


Post by ahelis »

Hi Alex, Would it be possible to share the fix? We are 2 days from code freeze, and we will not have enough time to regress a full version change. We include the taskboard.umd.js file in our code base, so we can patch 5.0.6 and validate on our side.


Post by mats »

We normally don't share code of individual fixes, but this one was minimal so here's the diff you can use to patch.

Attachments
Screenshot 2022-07-16 at 08.59.00.png
Screenshot 2022-07-16 at 08.59.00.png (301.9 KiB) Viewed 568 times

Post by ahelis »

Thank you, we have patched our version and this fix resolved the double encoding issue.


Post Reply